Esempio n. 1
0
GLPI is free software; you can redistribute it and/or modify
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.

GLPI 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; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
--------------------------------------------------------------------------
*/
// ----------------------------------------------------------------------
// Original Author of file:
// Purpose of file:
// ----------------------------------------------------------------------
// Entry menu case
define('GLPI_ROOT', '../../..');
include GLPI_ROOT . "/inc/includes.php";
$welcome = $LANG['plugin_mobile']['navigation']['options'];
$common = new PluginMobileCommon();
$common->displayCommonHtmlHeader();
$common->displayPopHeader($welcome, 'options');
$option = new PluginMobileOption();
$option->showForm();
$common->displayPopFooter();
$common->displayFooter();
Esempio n. 2
0
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with GLPI; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
--------------------------------------------------------------------------
*/
// ----------------------------------------------------------------------
// Original Author of file:
// Purpose of file:
// ----------------------------------------------------------------------
//http://192.168.1.118/sos-084/plugins/mobile/front/stat.graph.php?id=671&date1=2013-09-14&date2=2014-01-14&type=user
define('GLPI_ROOT', '../../..');
include GLPI_ROOT . "/inc/includes.php";
global $LANG;
$common = new PluginMobileCommon();
$common->displayHeader($LANG['Menu'][13] . " " . strtolower($LANG['stats'][47]), 'stat.php');
Session::checkRight("statistic", "1");
if (empty($_REQUEST["type"])) {
    $_REQUEST["type"] = "user";
}
if (empty($_REQUEST["showgraph"])) {
    $_REQUEST["showgraph"] = 0;
}
if (empty($_REQUEST["date1"]) && empty($_REQUEST["date2"])) {
    $year = date("Y") - 1;
    $_REQUEST["date1"] = date("Y-m-d", mktime(1, 0, 0, date("m"), date("d"), $year));
    $_REQUEST["date2"] = date("Y-m-d");
}
if (!empty($_REQUEST["date1"]) && !empty($_REQUEST["date2"]) && strcmp($_REQUEST["date2"], $_REQUEST["date1"]) < 0) {
    $tmp = $_REQUEST["date1"];
Esempio n. 3
0
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; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
--------------------------------------------------------------------------
*/
// ----------------------------------------------------------------------
// Original Author of file:
// Purpose of file:
// ----------------------------------------------------------------------
//define('GLPI_ROOT', '../..');
//include (GLPI_ROOT . "/inc/includes.php");
include "../../inc/includes.php";
$common = new PluginMobileCommon();
define("MOBILE_EXTRANET_ROOT", "../../plugins/mobile");
$_POST = array_map('stripslashes', $_POST);
//Do login and checks
//$user_present = 1;
if (!isset($_POST['login_name'])) {
    $_POST['login_name'] = '';
}
if (isset($_POST['login_password'])) {
    $_POST['login_password'] = Toolbox::unclean_cross_side_scripting_deep($_POST['login_password']);
} else {
    $_POST['login_password'] = '';
}
// Redirect management
$REDIRECT = "";
if (isset($_POST['redirect']) && strlen($_POST['redirect']) > 0) {
Esempio n. 4
0
Inventaire
This file is part of GLPI.

GLPI is free software; you can redistribute it and/or modify
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.

GLPI 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; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
--------------------------------------------------------------------------
*/
// ----------------------------------------------------------------------
// Original Author of file:
// Purpose of file:
// ----------------------------------------------------------------------
// Entry menu case
define('GLPI_ROOT', '../../..');
include GLPI_ROOT . "/inc/includes.php";
$welcome = PluginMobileTab::getpluginTitle($_REQUEST['glpi_tab'], $_REQUEST['itemtype'], $_REQUEST['id']);
$common = new PluginMobileCommon();
$common->displayHeader($welcome);
$tab = new PluginMobileTab();
$tab->showPluginTab($_REQUEST['glpi_tab'], $_REQUEST['itemtype'], $_REQUEST['id']);
$url = Toolbox::getItemTypeTabsURL($_REQUEST['itemtype']);
Esempio n. 5
0
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; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
--------------------------------------------------------------------------
*/
// ----------------------------------------------------------------------
// Original Author of file:
// Purpose of file:
// ----------------------------------------------------------------------
// Entry menu case
define('GLPI_ROOT', '../../..');
include GLPI_ROOT . "/inc/includes.php";
$common = new PluginMobileCommon();
$common->displayHeader($LANG['Menu'][13], 'ss_menu.php?menu=maintain');
$basedir = $CFG_GLPI["root_doc"] . "/plugins/mobile/front/";
echo "<div data-role='content'>";
//Affichage du tableau de presentation des stats
echo "<ul data-role='listview' data-inset='true'>";
echo "<li data-role='list-divider'>" . $LANG['stats'][0] . "&nbsp;:</li>";
echo "<li><a href='" . $basedir . "stat.global.php'>" . $LANG['stats'][1] . "</a></li>";
echo "<li><a href='" . $basedir . "stat.tracking.php'>" . $LANG['stats'][47] . "</a></li>";
//echo "<li><a href='".$basedir."stat.location.php'>".
//      $LANG['stats'][3]."</a></li>";
/*
echo "<li><a href='".$basedir."stat.location.php'><b>".
     $LANG['stats'][3]."</b></a><br> (".$LANG['common'][15].", ".$LANG['common'][17].", ".
     $LANG['computers'][9].", ".$LANG['devices'][4].", ".$LANG['computers'][36].", ".
     $LANG['devices'][2].", ".$LANG['devices'][5].")</li>"; 
Esempio n. 6
0
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
--------------------------------------------------------------------------
*/
// ----------------------------------------------------------------------
// Original Author of file:
// Purpose of file:
// ----------------------------------------------------------------------
// Entry menu case
define('GLPI_ROOT', '../../..');
include GLPI_ROOT . "/inc/includes.php";
$welcome = "&nbsp;";
//$welcome = "GLPI - Mobile";
//version check
$ver = explode(" ", implode(" ", plugin_version_mobile()));
$urlv = "http://a.fsdn.com/con/app/proj/glpimobile/screenshots/" . $ver[1] . ".png";
$headers = get_headers($urlv, 1);
if ($headers[0] != '') {
    if ($headers[0] == 'HTTP/1.0 404 Not Found') {
        $welcome = 'GLPI - Mobile &nbsp; <a href="https://forge.glpi-project.org/projects/mobile/files" target="_blank" style="color:#fff;">                
	           <span class="blink_me">' . __('New version avaliable') . '</span></a>';
    } else {
        $welcome = "GLPI - Mobile";
    }
}
$common = new PluginMobileCommon();
$common->displayHeader($welcome, 'central.php', true, '', 'ss_menu');
if (!isset($_REQUEST['menu'])) {
    $_REQUEST['menu'] = 'inventory';
}
$menu = new PluginMobileMenu();
$menu->showSpecificMenu($_REQUEST['menu']);
Esempio n. 7
0
This file is part of GLPI.

GLPI is free software; you can redistribute it and/or modify
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.

GLPI 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; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
--------------------------------------------------------------------------
*/
// ----------------------------------------------------------------------
// Original Author of file:
// Purpose of file:
// ----------------------------------------------------------------------
// Entry menu case
define('GLPI_ROOT', '../../..');
include GLPI_ROOT . "/inc/includes.php";
$itemtype = $_GET['itemtype'];
$common = new PluginMobileCommon();
$common->displayCommonHtmlHeader();
$common->displayPopHeader($LANG['buttons'][0], 'searchbox');
PluginMobileSearch::showGenericSearch($itemtype, $_GET);
$common->displayPopFooter();
$common->displayFooter();
Esempio n. 8
0
GLPI is free software; you can redistribute it and/or modify
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.

GLPI 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; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
--------------------------------------------------------------------------
*/
// ----------------------------------------------------------------------
// Original Author of file:
// Purpose of file:
// ----------------------------------------------------------------------
// Entry menu case
define('GLPI_ROOT', '../..');
include GLPI_ROOT . "/inc/includes.php";
$common = new PluginMobileCommon();
$common->displayHeader();
$common->displayLoginBox();
$common->displayFooter();
?>


Esempio n. 9
0
You should have received a copy of the GNU General Public License
along with GLPI; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
--------------------------------------------------------------------------
*/
// ----------------------------------------------------------------------
// Original Author of file:
// Purpose of file:
// ----------------------------------------------------------------------
// Entry menu case
define('GLPI_ROOT', '../../..');
include GLPI_ROOT . "/inc/includes.php";
$welcome = PluginMobileTab::getTitle($_REQUEST['glpi_tab'], $_REQUEST['itemtype'], $_REQUEST['id']);
$back = "item.php?itemtype=" . $_GET['itemtype'] . "&menu=" . $_GET['menu'] . "&ssmenu=" . $_GET['ssmenu'] . "computer&id=" . $_GET['id'];
$common = new PluginMobileCommon();
$common->displayHeader($welcome, $back);
PluginMobileTab::displayTabBar();
//Stevenes Donato
$glpi_tab = $_REQUEST['glpi_tab'];
$itemtype = $_REQUEST['itemtype'];
//echo $glpi_tab."tab";
// Followup / acompanhamento
if ($_REQUEST['glpi_tab'] == "TicketFollowup\$1") {
    global $DB;
    //add followup
    echo '<form action="followup.php?id=' . $_REQUEST['id'] . '" method="post">
<input type="submit" name="follow" value="' . $LANG['plugin_mobile']['common'][7] . '">';
    Html::closeForm();
    $sql_fup = "SELECT * \nFROM glpi_ticketfollowups\nWHERE tickets_id = " . $_REQUEST['id'] . "\nORDER BY glpi_ticketfollowups.date DESC";
    $result_fup = $DB->query($sql_fup);
Esempio n. 10
0
--------------------------------------------------------------------------
*/
// ----------------------------------------------------------------------
// Original Author of file:
// Purpose of file:
// ----------------------------------------------------------------------
// Entry menu case
//define('GLPI_ROOT', '../../..');
include "../../../inc/includes.php";
$itemtype = $_REQUEST['itemtype'];
$menu_obj = new PluginMobileMenu();
$menu = $menu_obj->getMenu();
if (isset($_REQUEST['menu']) && isset($_REQUEST['ssmenu'])) {
    $welcome = $menu[$_REQUEST['menu']]['content'][$_REQUEST['ssmenu']]['title'];
    $_SESSION['plugin_mobile']['menu'] = $_REQUEST['menu'];
    $_SESSION['plugin_mobile']['ssmenu'] = $_REQUEST['ssmenu'];
    if (isset($_REQUEST['start'])) {
        $_SESSION['plugin_mobile']['start'] = $_REQUEST['start'];
    } else {
        $_SESSION['plugin_mobile']['start'] = 0;
    }
} else {
    $welcome = "&nbsp;";
}
$common = new PluginMobileCommon();
$common->displayHeader($welcome, "ss_menu.php?menu=" . $_REQUEST['menu'], true);
PluginMobileSearch::manageGetValues($itemtype);
//Search::manageParams($itemtype);
$numrows = PluginMobileSearch::show(ucfirst($itemtype));
PluginMobileSearch::displayFooterNavBar("search.php?itemtype=" . $itemtype . "&menu=" . $_REQUEST['menu'] . "&ssmenu=" . $_REQUEST['ssmenu'], $numrows);
$common->displayFooter();
Esempio n. 11
0
if (!isset($_GET['type'])) {
    $_GET['type'] = "week";
}
if (!isset($_GET['usertype'])) {
    $_GET['usertype'] = "user";
}
if (!isset($_GET['uID'])) {
    $_GET['uID'] = $SESSION['glpiID'];
}
//getLoginUserID();
if (!isset($_GET['gID'])) {
    $_GET['gID'] = 0;
}
switch ($_GET["usertype"]) {
    case "user":
        $_GET['gID'] = -1;
        break;
    case "group":
        $_GET['uID'] = -1;
        break;
    case "user_group":
        $_GET['gID'] = "mine";
        break;
}
//$welcome = $LANG['Menu'][29];
$welcome = __('Planning');
$common = new PluginMobileCommon();
$common->displayHeader($welcome, 'ss_menu.php?menu=maintain');
PluginMobilePlanning::showSelectionForm($_GET['date'], $_GET['type'], $_GET['usertype'], $_GET['uID'], $_GET['gID']);
PluginMobilePlanning::show($_GET['date'], $_GET['type'], $_GET['uID'], $_GET['gID']);
$common->displayFooter();
Esempio n. 12
0
$item = new PluginMobileItem;
$item->displayItem($_REQUEST['id'], $_REQUEST['itemtype']);
*/
if (!Session::haveRight("ticket", READ)) {
    return false;
}
$itemtype = $_REQUEST['itemtype'];
$welcome = "&nbsp;";
if (class_exists($itemtype)) {
    $classname = ucfirst($itemtype);
    $obj = new $classname();
    $welcome = $obj->getTypeName() . " (" . $_REQUEST['id'] . ")";
}
$table = $obj->getTable();
//saveActiveProfileAndApplyRead();
$common = new PluginMobileCommon();
$common->displayHeader($welcome, "search.php?menu=" . $_GET['menu'] . "&ssmenu=" . $_GET['ssmenu'] . "&itemtype={$itemtype}", '', '', 'item');
PluginMobileTab::displayTabBar();
//ticket
if ($itemtype == "Ticket") {
    $sql_tick = "SELECT * \nFROM glpi_tickets\nWHERE id = " . $_REQUEST['id'] . " ";
    $result_tick = $DB->query($sql_tick);
    echo '<ul class="ui-listview" data-theme="c" data-role="listview">';
    while ($row = $DB->fetch_assoc($result_tick)) {
        //requester
        $sql_autor = "SELECT DISTINCT glpi_users.id AS id\n\tFROM glpi_tickets_users, glpi_users, glpi_tickets\n\tWHERE glpi_users.id = glpi_tickets_users.users_id\n\tAND glpi_tickets.id = " . $_REQUEST['id'] . "\n\tAND glpi_tickets_users.tickets_id = glpi_tickets.id \n\tAND  glpi_tickets_users.type = 1";
        $result_autor = $DB->query($sql_autor);
        $row_autor = $DB->fetch_assoc($result_autor);
        //technician
        $sql_tech = "SELECT DISTINCT glpi_users.id AS id\n\tFROM glpi_tickets_users, glpi_users, glpi_tickets\n\tWHERE glpi_users.id = glpi_tickets_users.users_id\n\tAND glpi_tickets.id = " . $_REQUEST['id'] . "\n\tAND glpi_tickets_users.tickets_id = glpi_tickets.id \n\tAND  glpi_tickets_users.type = 2";
        $result_tech = $DB->query($sql_tech);
Esempio n. 13
0
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

GLPI 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; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
--------------------------------------------------------------------------
*/
define('GLPI_ROOT', '../../..');
include GLPI_ROOT . "/inc/includes.php";
Session::checkLoginUser();
if (!isset($_GET["itemtype"])) {
    exit;
} else {
    $itemtype = $_GET["itemtype"];
}
if (!isset($_GET["type"])) {
    exit;
} else {
    $type = $_GET["type"];
}
$common = new PluginMobileCommon();
$common->displayHeader($LANG['common'][12], "search.php?itemtype={$itemtype}" . "&amp;menu=" . $_SESSION['plugin_mobile']['menu'] . "&amp;ssmenu=" . $_SESSION['plugin_mobile']['ssmenu'] . "&amp;start=" . $_SESSION['plugin_mobile']['start'] . "&amp;rand=" . mt_rand());
$searchconfig = new PluginMobileSearchconfig();
$searchconfig->showSearchConfigList($itemtype, $type);
$common->displayFooter();
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; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
--------------------------------------------------------------------------
*/
// ----------------------------------------------------------------------
// Original Author of file:
// Purpose of file:
// ----------------------------------------------------------------------
define('GLPI_ROOT', '../../..');
include GLPI_ROOT . "/inc/includes.php";
$common = new PluginMobileCommon();
$common->displayHeader($LANG['Menu'][13], 'stat.php');
Session::checkRight("statistic", "1");
$itemtype = "Ticket";
if (empty($_REQUEST["showgraph"])) {
    $_REQUEST["showgraph"] = 0;
}
if (empty($_REQUEST["date1"]) && empty($_REQUEST["date2"])) {
    $year = date("Y") - 1;
    $_REQUEST["date1"] = date("Y-m-d", mktime(1, 0, 0, date("m"), date("d"), $year));
    $_REQUEST["date2"] = date("Y-m-d");
}
if (!empty($_REQUEST["date1"]) && !empty($_REQUEST["date2"]) && strcmp($_REQUEST["date2"], $_REQUEST["date1"]) < 0) {
    $tmp = $_REQUEST["date1"];
    $_REQUEST["date1"] = $_REQUEST["date2"];
    $_REQUEST["date2"] = $tmp;
Esempio n. 15
0
 public function displayItem($ID, $itemtype)
 {
     global $LANG, $CFG_GLPI, $ID;
     $welcome = "&nbsp;";
     if (class_exists($itemtype)) {
         $classname = ucfirst($itemtype);
         $obj = new $classname();
         $welcome = $obj->getTypeName() . " (" . $_REQUEST['id'] . ")";
     }
     $table = $obj->getTable();
     //saveActiveProfileAndApplyRead();
     $common = new PluginMobileCommon();
     $common->displayHeader($welcome, "search.php?menu=" . $_GET['menu'] . "&ssmenu=" . $_GET['ssmenu'] . "&itemtype={$itemtype}", '', '', 'item');
     echo "<form action='" . $CFG_GLPI["root_doc"] . "/plugins/mobile/front/item.form.php?menu=" . $_GET['menu'] . "&ssmenu=" . $_GET['ssmenu'] . "&itemtype={$itemtype}&id={$ID}" . "' method='post'>";
     if (largeScreen() && DISPLAYLEFTPANEL) {
         //if (true) {
         //if (false) {
         /*ob_start();
                  $obj->showForm($ID);  
                  $out = ob_get_contents();      
                  ob_end_clean();
                  
                  //delete script         
                  $out = preg_replace('/((<[\s\/]*script\b[^>]*>)([^>]*)(<\/script>))/i', '', $out);
                  
                  //hide tooltips
                  $out = preg_replace('/(<a id=\'tooltip[^>])(.*?)(<\/a>)/', '', $out);
                  $out = preg_replace('/(<img id=\'tooltip[^>])(.*?)(>)/', '', $out);
                  
                  //parse menu navigate
                  $out = preg_replace('/(<a)(.*?)(search\.php[^>])(.*?)(<\/a>&nbsp;\:)/', '', $out);      
                  $out = preg_replace('/(item\.php\?id=[0-9]*)/', '$0'."&menu=".$_GET['menu']."&ssmenu=".$_GET['ssmenu']."&itemtype=$itemtype", $out);     
                  $out = preg_replace('/(<a[^.]*showHideDiv[^>])(.*?)(<\/a>)/', '', $out);         
                  preg_match_all('/(<div id=\'menu_navigate[^>])(.*?)(<\/div>)/', $out, $matches);
                  $out = preg_replace('/(<div id=\'menu_navigate[^>])(.*?)(<\/div>)/', '', $out);
                  
                  //show select in native 
                  $out = str_replace('<select', "<select data-native-menu='true'", $out);           
                  
                  $common->displayTabBar($matches[0]);
                           
                  ob_start();
                  $this->showButtons($itemtype, $ID);
                  $buttons_form = ob_get_contents();      
                  ob_end_clean();
                  $out .= $buttons_form;
         
                  echo $out;*/
         $savecolslimit = $_SESSION['plugin_mobile']['cols_limit'];
         $saverowslimit = $_SESSION['plugin_mobile']['rows_limit'];
         $_SESSION['plugin_mobile']['cols_limit'] = 1;
         $_SESSION['plugin_mobile']['rows_limit'] = 50;
         $_GET['showheader'] = false;
         echo "<div class='ui-grid-a' style='position:relative;'>";
         echo "<div id='left_panel' class='ui-block-a'>";
         echo "<div data-role='header' data-backbtn='false' data-theme='a' data-id='TabBar'>";
         echo "<div data-theme='c' class='ui-btn-right' style='top:0' data-position='inline'>";
         echo "<a data-role='button' data-theme='c'>test</a>";
         echo "</div></div>";
         echo "<div style='height:600px;'>";
         PluginMobileSearch::manageGetValues($itemtype);
         //Search::manageParams($itemtype);
         $numrows = PluginMobileSearch::show(ucfirst($itemtype));
         echo "</div>";
         echo "</div>";
         echo "<div class='ui-block-b' id='right_panel'>";
         PluginMobileTab::displayTabBar();
         echo "<div style='height:570px;'>";
         $_SESSION['plugin_mobile']['cols_limit'] = $savecolslimit;
         $_SESSION['plugin_mobile']['rows_limit'] = $saverowslimit;
     } else {
         PluginMobileTab::displayTabBar();
     }
     $obj->getFromDB($ID);
     $p['itemtype'] = $_REQUEST['itemtype'];
     //$p['itemtype'] = '';
     $p['id'] = false;
     $p['return_fields'] = array();
     $p['show_label'] = true;
     $p['show_name'] = true;
     foreach ($params as $key => $value) {
         $p[$key] = $value;
     }
     if (largeScreen()) {
         $obj = $this->removeBlacklistedField($obj);
         $nb_items = count($obj->fields);
         $tmp = array_chunk($obj->fields, ceil($nb_items / 2), true);
         $fields1 = $tmp[1];
         $fields2 = $tmp[0];
         $params1 = array('data' => $fields1, 'options' => $p, 'searchOptions' => $obj->getSearchOptions(), 'itemtype' => $itemtype);
         $params2 = $params1;
         $params2['data'] = $fields2;
         $this->getLabels($params1, $labels1);
         $this->getLabels($params2, $labels2);
         //echo $fields1 ."<br>";
         //echo count($labels2)."<br>";
         echo "<div class='ui-grid-a' id='tablet-grid'>";
         echo "<div class='ui-block-a'>";
         $this->showList($labels1, $itemtype);
         echo "</div>";
         echo "<div class='ui-block-b'>";
         $this->showList($labels2, $itemtype);
         echo "</div>";
         echo "</div>";
     } else {
         $params = array('data' => $obj->fields, 'options' => $p, 'searchOptions' => $obj->getSearchOptions(), 'itemtype' => $itemtype);
         $this->getLabels($params, $labels);
         unset($labels['id']);
         $this->showList($labels, $itemtype);
     }
     if (editMode()) {
         $this->showButtons($itemtype, $ID);
     }
     if (largeScreen() && DISPLAYLEFTPANEL) {
         echo "</div></div></div>";
     }
     // restoreActiveProfile();
     //Close Form
     //echo "</form>";
     Html::closeForm();
     $common->displayFooter();
 }
Esempio n. 16
0
You should have received a copy of the GNU General Public License
along with GLPI; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
--------------------------------------------------------------------------
*/
// ----------------------------------------------------------------------
// Original Author of file: MickaelH - IPEOS I-Solutions - www.ipeos.com
// Purpose of file: This file is used to show the creation ticket form
// in the page.
// ----------------------------------------------------------------------
define('GLPI_ROOT', '../../..');
include GLPI_ROOT . "/inc/includes.php";
$welcome = __('Solution');
$back = "item.php?itemtype=Ticket&menu=maintain&ssmenu=ticket&id=" . $_REQUEST['id'] . "";
$common = new PluginMobileCommon();
$common->displayHeader($welcome, $back);
echo "<form method='post' name='solutionform' action=" . $CFG_GLPI["root_doc"] . "/plugins/mobile/front/solution.php?id=" . $_REQUEST['id'] . "&new=1 >";
echo "<table>";
echo "<tr class='tab_bg_1'>";
echo "<td>&nbsp;</td>";
echo "</tr>";
echo "<tr class='tab_bg_1'>";
echo "<td>" . __('Solution') . ":</td>";
echo "</td></tr>";
echo "<tr class='tab_bg_1'>";
echo "<td class='right' colspan='2'><textarea name='content' cols='78' rows='14' >{$content}</textarea>";
echo "</td></tr>";
echo "<input type='hidden' name='_from_followup' value='{$from_followup}'>";
echo "<input type='hidden' name='requesttypes_id' value='1'";
echo "<input type='hidden' name='is_private' value='0'";
Esempio n. 17
0
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; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
--------------------------------------------------------------------------
*/
// ----------------------------------------------------------------------
// Original Author of file:
// Purpose of file:
// ----------------------------------------------------------------------
// Entry menu case
define('GLPI_ROOT', '../../..');
include GLPI_ROOT . "/inc/includes.php";
include '../inc/common.class.php';
//redirect to menu
//define("MOBILE_EXTRANET_ROOT", "../../../plugins/mobile");
$welcome = $LANG['plugin_mobile']["welcome"];
require_once "../hook.php";
//redirect to menu
//Html::redirect(MOBILE_EXTRANET_ROOT . "/front/ss_menu.php?menu=maintain");
if (!isset($_GET['message'])) {
    $_GET['message'] = '';
}
$common = new PluginMobileCommon();
$common->displayHeader($welcome, '', false, '', 'central');
$menu = new PluginMobileMenu();
$menu->showFirstLevel($_GET['message']);
$common->displayFooter();