AccountHub/apps/inventory_link.php

24 lines
1012 B
PHP
Raw Normal View History

2017-05-30 13:24:46 -06:00
<?php
2017-12-16 13:27:09 -07:00
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
2017-05-30 13:24:46 -06:00
dieifnotloggedin();
addMultiLangStrings(["en_us" => [
"inventory" => "Inventory",
"open inventory system" => "Open the inventory system"
]
]);
$APPS["inventory_link"]["i18n"] = TRUE;
$APPS["inventory_link"]["title"] = "inventory";
$APPS["inventory_link"]["icon"] = "cubes";
$APPS["inventory_link"]["type"] = "teal";
$content = "<p class='mobile-app-hide'>" . lang("open inventory system", false) . '</p><a href="' . INVENTORY_HOME . '" class="btn btn-primary btn-block mobile-app-hide">' . lang("open app", false) . ' &nbsp;<i class="fa fa-external-link-square"></i></a>';
2017-05-30 13:24:46 -06:00
$APPS["inventory_link"]["content"] = $content;
require_once __DIR__ . "/../lib/login.php";
if (account_has_permission($_SESSION['username'], "INV_VIEW") !== true) {
unset($APPS['inventory_link']);
}
2017-05-30 13:24:46 -06:00
?>