ヤミRoot VoidGate
User / IP
:
216.73.216.211
Host / Server
:
146.88.233.70 / dev.loger.cm
System
:
Linux hybrid1120.fr.ns.planethoster.net 3.10.0-957.21.2.el7.x86_64 #1 SMP Wed Jun 5 14:26:44 UTC 2019 x86_64
Command
|
Upload
|
Create
Mass Deface
|
Jumping
|
Symlink
|
Reverse Shell
Ping
|
Port Scan
|
DNS Lookup
|
Whois
|
Header
|
cURL
:
/
home
/
itrave
/
api
/
src
/
AppBundle
/
Repository
/
Viewing: CabBookingRepository.php
<?php namespace AppBundle\Repository; /** * CabBookingRepository * * This class was generated by the Doctrine ORM. Add your own custom * repository methods below. */ class CabBookingRepository extends \Doctrine\ORM\EntityRepository { public function getConcurentBookings($cab,$cabBooking) { $startTime = $cabBooking->getStartTime(); $duration = $cabBooking->getDuration(); $qb =$this ->createQueryBuilder('cBooking') ->where('cBooking.cab = :cab') ->setParameter('cab', $cab); $cabBookings_array = $qb ->getQuery() ->getResult(); $dateInterval = new \dateInterval('PT'.$duration.'H'); $endTime = new \Datetime($startTime->format('Y-m-d H:i')); $endTime = date_add($endTime,$dateInterval); foreach( $cabBookings_array as $key =>$booking) { if($booking->getStartTime() > $endTime OR $booking->getEndTime() < $startTime) unset($cabBookings_array[$key]); } return $cabBookings_array; } public function search($companyId, $customerId, $cabId, $startTime , $duration, $withDriver, $isActive = true) { $qb =$this ->createQueryBuilder('cBooking'); if($cabId) $qb ->innerJoin('cBooking.cab', 'cab', 'WITH', 'cab.cabId = :cabId') ->setParameter('cabId', $cabId); else if($companyId) $qb ->innerJoin('cBooking.cab') ->addSelect('cab') ->innerJoin('cab.company', 'company', 'WITH', 'company.companyId = :companyId' ) ->setParameter('companyId', $companyId); if($customerId) $qb ->innerJoin('cBooking.customer', 'customer', 'WITH', 'customer.customerId = :customerId' ) ->setParameter('customerId', $customerId); if(!$startTime) $startTime = new \Datetime(); $qb->andWhere('cBooking.startTime >= :startTime') ->setParameter('startTime', $startTime); if($duration); //TODO ; if($withDriver) $qb ->andWhere('cBooking.withDriver = :withDriver') ->setParameter('withDriver', $withDriver); if($isActive) $qb ->andWhere('cBooking.isActive = :isActive') ->setParameter('isActive', $isActive); $cabBookings_array = $qb ->getQuery() ->getResult(); return $cabBookings_array; } }
Coded With 💗 by
0x6ick