} if (isset($_POST['4'])) { $rating = '4'; } if (isset($_POST['5'])) { $rating = '5'; } if (!isset($rating)) { $rating = '0'; } $review = addslashes($_POST['message']); if ($transcript = $GLOBALS['db']->query('SELECT * FROM `transcripts` WHERE `chatid`="' . $chatid . '" ORDER BY `timestamp` DESC LIMIT 1')) { $transcriptid = $transcript[0]['id']; } else { $transcriptid = 0; } $operatorid = $_SESSION['hcl_' . $chatid]['operatorid']; $GLOBALS['operator']->review($operatorid, $chatid, $transcriptid, $rating, $review); } else { $GLOBALS['template']->assign('display', 'default'); if (isset($_GET['close'])) { $GLOBALS['template']->assign('end_message', parse_with_session($chatid, $GLOBALS['lang']['chat_end_visitor'])); } else { $GLOBALS['template']->assign('end_message', parse_with_session($chatid, $GLOBALS['lang']['chat_end_operator'])); } } } // Display the output $GLOBALS['template']->display('chat_end.tpl'); // do events that need to be done at the end of the file $inc->finished();
echo $GLOBALS['conf']['url']; ?> /live/chat/response.php', '', 'reset'); this.chat_message = '<br /><div align="center"><i><span class="operator"><?php echo parse_with_session($chatid, $GLOBALS['lang']['cobrowse_started']); ?> </span></i></div><br />'; parent.window.chat_display.document.body.innerHTML = parent.window.chat_display.document.body.innerHTML + this.chat_message; this.font_apply(); parent.window.opener.CoBrowse.track = true; parent.window.opener.CoBrowse.initiateforms();} } } this.cobrowse_disconnect = function() { this.cobrowse = false; this.chat_message = '<br /><div align="center"><i><span class="operator"><?php echo $GLOBALS['lang']['cobrowse_ended']; ?> </span></i></div><br />'; parent.window.chat_display.document.body.innerHTML = parent.window.chat_display.document.body.innerHTML + this.chat_message; this.font_apply();} this.coforms = function(type, name, value) { if (this.cobrowse) { if (parent.window.opener.CoBrowse.track) { parent.window.opener.CoBrowse.getforms(type, name, value); if (name !== this.coforms_current) { this.coforms_current = name; this.chat_message = '<br /><div align="center"><i><span class="operator"><?php echo parse_with_session($chatid, $GLOBALS['lang']['coforms_received']); ?> </span></i></div><br />'; parent.window.chat_display.document.body.innerHTML = parent.window.chat_display.document.body.innerHTML + this.chat_message; this.font_apply();} } } } this.copage = function(url) { if (this.cobrowse) { if (parent.window.opener) { if (url != this.copageurl) { this.copageurl = url; parent.window.opener.document.location = unescape(url);} } } } this.comarker = function(type, x, y) { if (this.cobrowse) { if (parent.window.opener.CoBrowse.track) { parent.window.opener.CoBrowse.insertmarker(type, x, y);} } } this.comarker_clear = function()
// You should have received a copy of the GNU General Public License // along with Help Center Live; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // Contributors: Michael Bird // File Comments: // This files displays all the chat messages include_once '../../class/include.php'; $inc = new Includer(); $inc->chat(); $inc->template(); if (isset($_GET['admin'])) { $GLOBALS['template']->assign('admin', 'true'); $admin = 'true'; } else { $GLOBALS['template']->assign('admin', 'false'); $admin = 'false'; } $GLOBALS['chat']->assign(addslashes($_GET['chatid'])); $GLOBALS['template']->assign('chatid', addslashes($_GET['chatid'])); $GLOBALS['template']->assign('messages', $GLOBALS['chat']->get_messages($admin, addslashes($_GET['chatid']))); if (isset($_GET['admin']) && $_SESSION['hcl_' . addslashes($_GET['chatid'])]['isoperator'] == 'true') { $GLOBALS['template']->assign('onload', ' onload="scroll(0,10000000);parent.window.Chat.checksum = ' . $GLOBALS['chat']->checksum(addslashes($_GET['chatid']), 'true') . ';"'); $GLOBALS['template']->assign('now_chatting', parse_with_session(addslashes($_GET['chatid']), $GLOBALS['lang']['now_chatting'], 'guest')); } else { $GLOBALS['template']->assign('onload', ' onload="scroll(0,10000000);parent.window.Chat.checksum = ' . $GLOBALS['chat']->checksum(addslashes($_GET['chatid']), 'false') . ';"'); $GLOBALS['template']->assign('now_chatting', parse_with_session(addslashes($_GET['chatid']), $GLOBALS['lang']['now_chatting'], 'operator')); } // Display the output $GLOBALS['template']->display('chat_display.tpl'); // do events that need to be done at the end of the file $inc->finished();