<?PHP
// Pushok's SEMA (Small Enterprise Management Application)
//
// Copyright (C) 2004 Pushok Software http://www.pushok.com
//
// LICENSE
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License (GPL)
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program 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.
//
// To read the license please visit http://www.gnu.org/copyleft/gpl.html
/*
subscription: contain necessary instruments for adding or removing object's flags.
*/
$nIdObject = 0;
if ( isset($_GET['idobject']) && $_GET['idobject']>0 )
$nIdObject = $_GET['idobject'];
else
web_RedirectRelative("sema.php");
class web_Rights extends web_Layout {
function Info() {
global $nIdObject;
$_oIn = array('idobject'=>$nIdObject);
$GLOBALS['LIB_DISPATCHER']->ProcessMessage("LM_OBJECT_INFO", $_oIn, $arObject);
$this->formStart($arObject['object']['title']);
$sFieldValue = "";
if (isset($arObject['object']) && count($arObject['object']))
$sFieldValue = $arObject['object']['flags'];
echo "<FORM method=\"POST\">\n";
echo "<INPUT type=\"hidden\" name=\"idform\" value=\"FM_OBJECT_FLAGS_SET\"></INPUT>\n";
$sLink = web_GetPrevPage();
if (!strlen($sLink))
$sLink = web_GetPageGetParams();
echo "<INPUT type=\"hidden\" name=\"onsuccess\" value=\"$sLink\"></INPUT>\n";
echo "<INPUT type=\"hidden\" name=\"onerror\" value=\"?".web_GetPageGetParams()."\"></INPUT>\n";
echo "<INPUT type=\"hidden\" name=\"idcontact\" value=\"".$_SESSION['iduser']."\"></INPUT>\n";
echo "<INPUT type=\"hidden\" name=\"idobject\" value=\"$nIdObject\"></INPUT>\n";
$this->formInputItem(_LW("Flags"), "objectflags", "flags", $sFieldValue);
$this->formInputItem(_LW("Set"), "submit");
echo "</FORM>\n";
$this->formEnd();
}
}
$oPage = new web_Rights;
$oPage->m_windowHeader = _LW("Object flags");
$oPage->WebStack("rights_object_flags.php", $oPage->m_windowHeader, $oPage->m_windowHeader, web_GetPageGetParams());
$_SESSION['active_page'] = web_GetPageGetParams();
if ( !isset($_SESSION['iduser']) )
web_RedirectRelative("sema.php");
$oPage->m_menuFLvl = "Rights";
$oPage->RenderPage();
?>