/** * SET FOREIGN_KEY_CHECKS=0; TRUNCATE team; TRUNCATE player; */ require_once 'vendor/autoload.php'; use Subash\Classes\CSVFile; use Subash\Classes\Teams; use Subash\Classes\Player; use Subash\Classes\UploadFileLog; while (true) { logme("polling"); $objFileLog = new UploadFileLog(); $isQueuedItem = $objFileLog->getQueuedItem('PLD'); if (count($isQueuedItem) > 0) { $objTeam = new Teams(); $teams = $objTeam->getTeamIds(); print_r($teams); $objPlayer = new Player(); $players = $objPlayer->getPlayerIds(); $filePath = $isQueuedItem['filename']; $uploadId = $isQueuedItem['id']; $fileObject = new CSVFile(__DIR__ . "/" . $filePath, true, ',', '"', '\\', true); $insertArray = []; $indexCount = 1; $fileObject->seek(PHP_INT_MAX); $totalCount = $fileObject->key(); $fileObject->seek(0); $proccessed = 0; $objFileLog->startProcessing($uploadId, $totalCount, 'IP'); logme("Start Processing on " . date('Y-M-D H:i:s'));
<?php require_once 'vendor/autoload.php'; use Subash\Classes\Player; use Subash\Classes\Teams; use Subash\Classes\Rssfeed; setlocale(LC_MONETARY, 'en_US.UTF-8'); $player = new Player(); $teams = new Teams(); $playerid = $_GET['pid']; $players = $player->getPlayerDetails($playerid); $playerSummary = $player->getPlayerSummary($playerid); // print_r($playerSummary);exit; $playerSummary = $playerSummary[0]; require_once 'header.php'; ?> <style> <!-- table { border-collapse: collapse; width: 100%; } th, td { text-align: left; padding: 8px; } tr:nth-child(even) { background-color: #f2f2f2 }
/** * SET FOREIGN_KEY_CHECKS=0; TRUNCATE team; TRUNCATE player; */ require_once 'vendor/autoload.php'; use Subash\Classes\CSVFile; use Subash\Classes\Teams; use Subash\Classes\Player; use Subash\Classes\UploadFileLog; while (true) { logme("polling"); $objFileLog = new UploadFileLog(); $isQueuedItem = $objFileLog->getQueuedItem('FX'); if (count($isQueuedItem) > 0) { $objTeam = new Teams(); $teams = $objTeam->getTeamIds(); //print_r ( $teams ); $filePath = $isQueuedItem['filename']; $uploadId = $isQueuedItem['id']; $fileObject = new CSVFile(__DIR__ . "/" . $filePath, true, ',', '"', '\\', true); $insertArray = []; $indexCount = 1; $fileObject->seek(PHP_INT_MAX); $totalCount = $fileObject->key(); $fileObject->seek(0); $proccessed = 0; $objFileLog->startProcessing($uploadId, $totalCount, 'IP'); logme("Start Processing on " . date('Y-M-d H:i:s')); foreach ($fileObject as $row) { $assoc = [];