Skip to content

Commit

Permalink
Expermineting to drag results
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrikBuetler committed Jun 18, 2024
1 parent c7bb9af commit a8466ad
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions api/ui/results.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,20 +70,27 @@ public function get() {
break;
case 'up':
$system = new System($this->get['systemId']);
echo "UID is " .$this->get['uid'] . "\n";
$arr = $system->getResultsAll();
//echo $arr;
$jsonJob = json_decode($arr, true);
foreach ($jsonJob as $job) {
//echo gettype($job) . "<br>";
// $job[0] should be ID
foreach ($job as $element) {
//echo gettype($element) . "<br>";
//echo 'Element: ' . $element. "<br>";
echo "UID is " .$this->get['uid'] . "\n";
echo $element;
if ($element == $this->get['uid']) {
if($job == $this->get['uid']) {
echo "found in job";
}
else {
foreach ($job as $element) {
//echo gettype($element) . "<br>";
//echo 'Element: ' . $element. "<br>";

echo $element;
echo gettype($element);
if ($element == $this->get['uid']) {

echo "found element. swap!\n";
echo "found element. swap!\n";
}
}
}
}
Expand Down

0 comments on commit a8466ad

Please sign in to comment.