new_user_request($_REQUEST['user'], $_REQUEST['tiki_user'], $_REQUEST['email'], $_REQUEST['reason']); print ($id); } if (isset($_REQUEST['set_operator_status'])) { $lslib->set_operator_status($_REQUEST['set_operator_status'], $_REQUEST['status']); } if (isset($_REQUEST['operators_online'])) { if ($lslib->operators_online()) { header("Content-type: image/png"); readfile('img/icons/live-support-on.png'); } else { header("Content-type: image/png"); readfile('img/icons/live-support-off.png'); } } if (isset($_REQUEST['write'])) { if ($_REQUEST['role'] == 'operator') { $color = 'blue'; } if ($_REQUEST['role'] == 'user') { $color = 'black'; } if ($_REQUEST['role'] == 'observer') { $color = 'grey'; } if (! strstr($_REQUEST['msg'], 'has left')) { $_REQUEST['msg'] = '(' . $_REQUEST['name'] . ')' . ' ' . $_REQUEST['msg'] . ''; } $lslib->put_message($_REQUEST['write'], $_REQUEST['msg'], $_REQUEST['senderId']); } if (isset($_REQUEST['get_last_event'])) { header("Content-type: text/plain"); echo $lslib->get_last_event($_REQUEST['get_last_event'], $_REQUEST['senderId']); } if (isset($_REQUEST['get_event'])) { header("Content-type: text/plain"); echo $lslib->get_support_event($_REQUEST['get_event'], $_REQUEST['last'], $_REQUEST['senderId']); } // A client closes its window if (isset($_REQUEST['client_close'])) { $lslib->user_close_request($_REQUEST['client_close']); } // An operator closes its window if (isset($_REQUEST['operator_close'])) { $lslib->operator_close_request($_REQUEST['operator_close']); } // A client polls for a connection if (isset($_REQUEST['get_status'])) { header("Content-type: text/plain"); echo $lslib->get_request_status($_REQUEST['get_status']); } // Operator console gets requests if (isset($_REQUEST['poll_requests'])) { // Now we can format this as XML header("Content-type: text/plain"); echo $lslib->get_last_request(); }