Beispiel #1
0
 public static function resume_conversation($in_id = null)
 {
     if (!JxBotConverse::bot_available()) {
         return $in_id;
     }
     if ($in_id === null) {
         if (isset($_COOKIE['jxbot-client'])) {
             $in_id = $_COOKIE['jxbot-client'];
         }
     }
     $out_id = JxBotConverse::resume_conversation($in_id);
     if ($in_id === null || $in_id != $out_id) {
         setcookie('jxbot-client', $out_id, 0);
     }
     return $out_id;
 }
Beispiel #2
0
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*******************************************************************************/
if (!defined('JXBOT_ADMIN')) {
    die('Direct script access not permitted.');
}
JxWidget::tabs(array(array('Talk', '?page=chat', 'subpage', ''), array('Defaults', '?page=chat&subpage=defaults', 'subpage', 'defaults'), array('Logs', '?page=chat&subpage=logs', 'subpage', 'logs')));
$subpage = JxBotUtil::inputs('subpage');
if ($subpage['subpage'] == 'defaults') {
    require_once 'admin_client.php';
} else {
    if ($subpage['subpage'] == 'logs') {
        require_once 'admin_logs.php';
    } else {
        $inputs = JxBotUtil::inputs('input');
        if (trim($inputs['input']) != '') {
            JxBotConverse::resume_conversation('admin');
            $response = JxBotConverse::get_response($inputs['input']);
        } else {
            $response = JxBotConverse::get_greeting();
        }
        ?>


<?php 
        JxWidget::textfield(array('name' => 'input', 'label' => 'Administrator', 'max' => 150, 'autofocus' => true));
        ?>


<p><?php 
        JxWidget::button('Talk');
        ?>