Example #1
0
 /**
  * @Route("/", name="admin")
  * @Template()
  */
 public function adminAction(Request $request)
 {
     $this->checkIp($request);
     if (!($currentRound = $this->roundRepo->findOneBy(['started' => true, 'finished' => false]))) {
         return $this->redirect($this->generateUrl('admin_round'));
     }
     if ($this->manager->getInfo()->getUnlockedUntil() === null) {
         $walletStatus = 'Not encrypted';
     } elseif ($this->manager->getInfo()->getUnlockedUntil() === 0) {
         $walletStatus = 'Locked';
     } elseif ($this->manager->getInfo()->getUnlockedUntil() > 0) {
         $walletStatus = 'UnpLocked';
     } else {
         $walletStatus = 'Unknown';
     }
     return $this->render('AppBundle:Admin:admin.html.twig', ['currentRound' => $currentRound, 'walletStatus' => $walletStatus]);
 }