getToken(); $_SESSION['token'] = $token; } $_SESSION['admin-uuid'] = $cryptography->uniqueID(); if(!isset($_SESSION['admin-uuid']) || empty($_SESSION['admin-uuid'])) { header("location: ../error/3/"); exit; } // create a new admin token if(!isset($_SESSION['uuid'])) { $token = $cryptography->uniqueID(); $token .= $cryptography->uniqueID(); $token .= $cryptography->uniqueID(); $token .= $cryptography->uniqueID(); $_SESSION['uuid'] = $token; } else { $token = $_SESSION['uuid']; } $result_orders = $db->query("SELECT * from `shop.orders` where `order.fulfilled` != 1"); $result_shop = $db->query("SELECT * from shop ORDER BY id DESC LIMIT 10"); $result_stock = $db->query("SELECT * from shop WHERE `product.stock` = 0"); $result = $db->query("SELECT * FROM components order by id DESC LIMIT 10"); if(isset($result_stock)) { if(count($result_stock) >=1) { $stock = "intro-circle-red"; } else { $stock = "intro-circle"; } } if(isset($result_orders)) { if(count($result_orders) >=1) { $neworder = "intro-circle-green"; } else { $neworder = "intro-circle"; } } ?>
There are no shop products. Add some by clicking Add item.
"; } else { ?>
clean($result_shop[$i]['product.title'],'encode');?> intcast($result_shop[$i]['product.stock']);?> left in stock edit delete
clean($result[$i]['component_title'],'encode');?> database edit delete