Example #1
0
function plugin_headings_mobile_profile($item, $withtemplate = 0)
{
    global $CFG_GLPI;
    $prof = new PluginMobileProfile();
    if (!$prof->getFromDBByProfile($item->getField('id'))) {
        $prof->createAccess($item->getField('id'));
    }
    $prof->showForm($item->getField('id'), array('target' => $CFG_GLPI["root_doc"] . "/plugins/mobile/front/profile.form.php"));
}
Example #2
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: Alexandre DELAUNAY
// Purpose of file: 
// ----------------------------------------------------------------------
*/
define('GLPI_ROOT', '../../..');
include GLPI_ROOT . "/inc/includes.php";
Session::checkRight("profile", "r");
$prof = new PluginMobileProfile();
//Save profile
if (isset($_POST['update'])) {
    $prof->update($_POST);
    $prof->changeProfile();
    Html::redirect($_SERVER['HTTP_REFERER']);
}