</head> <body style="background-image: none; background-color: #000C00;"> <?php (new Navbar())->show('USTAV'); ?> <div class="container-fluid blackblock lowerblock" style="padding-top: 40px; height: 100%;"> <div class="row"> <?php $auth = new AspidAuth(); $member = $auth->authOpenAPIMember(); if ($member !== FALSE) { $inventoryDAO = new InventoryDAO(); $comboboxFactory = new ComboboxFactory(); $itemGroupDictionary = new ItemGroupDictionary($inventoryDAO); //&& (!isset($_GET) || !isset($_GET['noncom'])) if ($auth->checkRole("COMMANDER") == 1 && !isset($_GET['noncom'])) { showInventoryBar($auth, $comboboxFactory, $itemGroupDictionary); } if ($auth->checkRole("COMMANDER") == 1 && !isset($_GET['noncom'])) { echo '<form id="inve"> <div id="inventoryContainer" class="col-md-12 inventory-main-block blackblock lowerblock" style="padding-bottom:40px; margin-top:84px;"> '; $allItems = $inventoryDAO->getAllItems(); foreach ($allItems as $i) { echo getItemBlock($i); } echo '
* User: tookuk * Date: 12.07.15 * Time: 15:33 */ ini_set("display_errors", 1); error_reporting(E_ALL); require_once "../classes/InventoryDAO.php"; require_once "../classes/AspidAuth.php"; require_once "../classes/Item.php"; if ($_POST != null) { //var_dump($_POST); $data = json_decode($_POST['jsn'], true); //var_dump("---- data ----"); //var_dump($data); //var_dump("---- end data ----"); $inventoryDao = new InventoryDAO(); $auth = new AspidAuth(); $item = new Item(); foreach ($data as $array) { if ($array['name'] == 'itemname') { $item->name = $array['value']; } else { if ($array['name'] == 'itemlink') { $item->link = $array['value']; } else { if ($array['name'] == 'itemtypeid') { $item->groupId = $array['value']; } else { if ($array['name'] == 'itemid') { $item->id = $array['value']; } else {
error_reporting(E_ALL); ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(-1); require_once "../classes/Navbar.php"; require_once "../classes/PageHead.php"; require_once "../classes/Item.php"; require_once "../classes/AspidAuth.php"; require_once "../classes/UserDAO.php"; require_once "../classes/InventoryDAO.php"; require_once "../classes/ComboboxFactory.php"; require_once "../classes/dictionary/GroupDictionary.php"; require_once "../classes/dictionary/RankDictionary.php"; require_once "../classes/PrivateNavbar.php"; require_once "../classes/WarningsAndErrors.php"; $inventoryDao = new InventoryDAO(); $userDao = new UserDAO(); $allItems = $inventoryDao->getAllItems(); $allUsers = $userDao->getAllActiveUsersOrderByAlphabet(); printTableOfItemType($allItems, 1, $allUsers, $inventoryDao); echo '<h2 style="color:#2b542c;">основное снаряжение</h2>'; printTableOfItemType($allItems, 2, $allUsers, $inventoryDao); echo '<h2 style="color:#2b542c;">второстепенное снаряжение</h2>'; printTableOfItemType($allItems, 3, $allUsers, $inventoryDao); echo '<h2 style="color:#2b542c;">рекомендуемое снаряжение</h2>'; /** * @param $allItems * @param $itemImportanceId * @param $allUsers * @param $inventoryDao */
/** * * @param <Inventory> $inventory * @return <Inventory> */ public function addToInventory($inventory) { $inventoryDao = new InventoryDAO(); $inventoryRet = $inventoryDao->addToInventory($inventory); return $inventoryRet; }
public function __construct(InventoryDAO $inventoryDAO) { $this->groups = $inventoryDAO->getAllItemGroups(); }
<?php /** * Created by PhpStorm. * User: tookuk * Date: 12.07.15 * Time: 15:33 */ ini_set("display_errors", 1); error_reporting(E_ALL); require_once "../classes/InventoryDAO.php"; require_once "../classes/AspidAuth.php"; require_once "../classes/Item.php"; if ($_POST != null) { $data = json_decode($_POST['jsn'], true); $inventoryDao = new InventoryDAO(); $auth = new AspidAuth(); $item = new Item(); foreach ($data as $array) { if ($array['name'] == 'itemname') { $item->name = $array['value']; } else { if ($array['name'] == 'itemlink') { $item->link = $array['value']; } else { if ($array['name'] == 'itemtypeid') { $item->groupId = $array['value']; } else { if ($array['name'] == 'itemid') { $item->id = $array['value']; } else {