Beispiel #1
0
 static function getMenuContent()
 {
     global $CFG_GLPI;
     $menu = array();
     $menu['title'] = self::getTypeName(2);
     $menu['page'] = self::getSearchURL(false);
     if (PluginOrderConfig::canView()) {
         $menu['links']['config'] = PluginOrderConfig::getFormURL(false);
     }
     if (PluginOrderOrder::canView()) {
         $menu['options']['order']['title'] = PluginOrderOrder::getTypeName(2);
         $menu['options']['order']['page'] = PluginOrderOrder::getSearchURL(false);
         $menu['options']['order']['links']['add'] = "/front/setup.templates.php?itemtype=PluginOrderOrder&add=1";
         if (PluginOrderOrder::canCreate()) {
             $menu['options']['order']['links']['search'] = PluginOrderOrder::getSearchURL(false);
         }
         $menu['options']['order']['links']['template'] = "/front/setup.templates.php?itemtype=PluginOrderOrder&add=0";
         if (PluginOrderConfig::canView()) {
             $menu['options']['order']['links']['config'] = PluginOrderConfig::getFormURL(false);
         }
     }
     $menu['options']['bill']['title'] = PluginOrderBill::getTypeName(2);
     $menu['options']['bill']['page'] = PluginOrderBill::getSearchURL(false);
     $menu['options']['bill']['links']['search'] = PluginOrderBill::getSearchURL(false);
     $menu['options']['bill']['links']['add'] = PluginOrderBill::getFormURL(false);
     $menu['options']['bill']['links']['config'] = PluginOrderConfig::getFormURL(false);
     $menu['options']['references']['title'] = PluginOrderReference::getTypeName(2);
     $menu['options']['references']['page'] = PluginOrderReference::getSearchURL(false);
     $menu['options']['references']['links']['search'] = PluginOrderReference::getSearchURL(false);
     $menu['options']['references']['links']['add'] = PluginOrderReference::getFormURL(false);
     $menu['options']['references']['links']['config'] = PluginOrderConfig::getFormURL(false);
     return $menu;
 }
Beispiel #2
0
    /* restore order */
} elseif (isset($_POST["restore"])) {
    $reference->check($_POST['id'], UPDATE);
    $reference->restore($_POST);
    $reference->redirectToList();
    /* purge order */
} elseif (isset($_POST["purge"])) {
    $reference->check($_POST['id'], UPDATE);
    $reference->delete($_POST, 1);
    $reference->redirectToList();
    /* update order */
} elseif (isset($_POST["update"])) {
    $reference->check($_POST['id'], UPDATE);
    $reference->update($_POST);
    Html::back();
}
if (isset($_GET["popup"]) && $_GET["popup"] == 1) {
    Html::popheader(PluginOrderReference::getTypeName(1), $_SERVER['PHP_SELF'], "management", "PluginOrderMenu", "references");
} else {
    Html::header(PluginOrderReference::getTypeName(1), $_SERVER['PHP_SELF'], "management", "PluginOrderMenu", "references");
}
if ($_GET['id'] == "") {
    $reference->showForm(-1);
} else {
    $reference->display($_GET, array('withtemplate' => $_GET['withtemplate'], 'popup' => $_GET["popup"], 'item' => $_GET["itemtype"]));
}
if (isset($_GET["popup"]) && $_GET["popup"] == 1) {
    Html::popfooter();
} else {
    Html::footer();
}
Beispiel #3
0
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation; either version 2 of the License, or
 (at your option) any later version.

 Order plugin is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.

 You should have received a copy of the GNU General Public License
 along with GLPI; along with Order. If not, see <http://www.gnu.org/licenses/>.
 --------------------------------------------------------------------------
 @package   order
 @author    the order plugin team
 @copyright Copyright (c) 2010-2011 Order plugin team
 @license   GPLv2+
            http://www.gnu.org/licenses/gpl.txt
 @link      https://forge.indepnet.net/projects/order
 @link      http://www.glpi-project.org/
 @since     2009
 ---------------------------------------------------------------------- */
include "../../../inc/includes.php";
Html::header(PluginOrderReference::getTypeName(), '', "plugins", "order", "reference");
$reference = new PluginOrderReference();
if (PluginOrderReference::canView()) {
    Search::show("PluginOrderReference");
} else {
    echo "<div align='center'><br><br><img src=\"" . $CFG_GLPI["root_doc"] . "/pics/warning.png\" alt=\"warning\"><br><br>";
    echo "<b>" . __("Access denied") . "</b></div>";
}
Html::footer();