public function getEntityManager()
 {
     if (null == $this->em) {
         try {
             $this->em = $this->getServiceLocator()->get('doctrine.entitymanager.orm_default');
             //$this->em = $this->getServiceLocator()->get('Doctrine\ORM\EntityManager');
         } catch (Exception $e) {
             print_r($e);
             print_r($e - getPrevious());
         }
     }
     return $this->em;
 }
}
?>


<div class="container">

    <h1> Gestor de Recursos Educacionais</h1>

    <h2>Sequence View - <?php 
echo $topico_atual["@Ontology#label"];
?>
</h2>
    <div class="col-lg-3 espacado">
        <form action="topicoatual.php" method="get">
            <?php 
$previous = getPrevious($topico);
if (count($previous) == 1) {
    echo "<button type='submit' name ='selecao'  value='" . $previous[0]["@Ontology#id"] . "' > Previous</button>";
    echo $previous[0]["@Ontology#label"];
}
/*
echo "<br><BR>Atual: ";
print_r($topico_atual);
*/
?>
            <input type="hidden" name="modelo" value="<?php 
echo $modelo;
?>
">
            </form>
Example #3
0
             if (preg_match('/([a-zA-Z]+)\\s+([a-zA-Z]+)\\s+([0-9]+)/', $msg, $matches)) {
                 $found_date = strtolower($matches[2] . ' ' . $matches[3]);
                 echo highlightText($msg);
             } else {
                 $msg = false;
                 break;
             }
         }
         if ($found_date != $date) {
             echo "{$red}Date {$date} not found{$black}\n";
         }
     } else {
         //time should be set
         $found_time = false;
         while ($found_time != $time) {
             if (!($msg = getPrevious($handle))) {
                 break;
             }
             if (preg_match('/([a-zA-Z]+)\\s+([a-zA-Z]+)\\s+([0-9]+)\\s+([0-9]+):([0-9]+)/', $msg, $matches)) {
                 $found_time = strtolower($matches[4] . ' ' . $matches[5]);
                 echo highlightText($msg);
             } else {
                 $msg = false;
                 break;
             }
         }
         if ($found_time != $time) {
             echo "{$red}[{$found_time} != {$time}]Time {$time} not found{$black}\n";
         }
     }
 }
Example #4
0
        exec("particle call {$photonName} setheight " . $presets[$previousPosition]['height']);
    } elseif ($cmd == "down" && isset($presets[$nextPosition])) {
        // Go down one position
        exec('notify-send -i ' . $presets[$nextPosition]['icon'] . ' "Moving desk to ' . $nextPosition . '"');
        exec("particle call {$photonName} setheight " . $presets[$nextPosition]['height']);
    } elseif (isset($presets[$cmd])) {
        // go to the preset
        exec('notify-send -i ' . $presets[$cmd]['icon'] . ' "Moving desk to ' . $cmd . '"');
        exec("particle call {$photonName} setheight " . $presets[$cmd]['height']);
    }
} else {
    if ($standingTime > 0 && $totalTime > 0) {
        echo "    Time Standing: " . convertToHoursMins($standingTime) . " - " . number_format($standingTime / $totalTime * 100, 1) . "%\n";
    }
    if ($sittingTime > 0 && $totalTime > 0) {
        echo "     Time Sitting: " . convertToHoursMins($sittingTime) . " - " . number_format($sittingTime / $totalTime * 100, 1) . "%\n";
    }
    echo "     Time at desk: " . convertToHoursMins($totalTime) . "\n\n";
    $currentHeight = exec("particle call {$photonName} getheight");
    echo "   Current Height: " . $currentHeight . "cm\n";
    $currentPosition = getClosest($currentHeight, $presets);
    $previousPosition = getPrevious($currentPosition, $presets);
    $nextPosition = getNext($currentPosition, $presets);
    if (!is_null($previousPosition)) {
        echo "      Up Position: " . $previousPosition . " (" . $presets[$previousPosition]['height'] . "cm)\n";
    }
    echo " Current Position: " . $currentPosition . " (" . $presets[$currentPosition]['height'] . "cm)\n";
    if (!is_null($nextPosition)) {
        echo "    Down Position: " . $nextPosition . " (" . $presets[$nextPosition]['height'] . "cm)\n";
    }
}
Example #5
0
<?php

$presenter = new Illuminate\Pagination\BootstrapPresenter($paginator);
?>

<?php 
if ($paginator->getLastPage() > 1) {
    ?>
    <nav class="text-right"> 
    
        <ul class="pagination">
            <?php 
    echo getPrevious($paginator->getCurrentPage(), $paginator->getUrl($paginator->getCurrentPage() - 1));
    ?>
            <?php 
    echo $presenter->getPageRange(1, $paginator->getLastPage());
    ?>
            <?php 
    echo getNext($paginator->getCurrentPage(), $paginator->getLastPage(), $paginator->getUrl($paginator->getCurrentPage() + 1));
    ?>

        </ul>
        
    </nav>
   
<?php 
}
?>

<?php 
function getPrevious($currentPage, $url)