global $DAplikacija;
class KEvidencijaPrivilegija extends KSifarnik
{
function KEvidencijaPrivilegija(&$DKorisnik)
{
global $Db,$DAplikacija;
include_once($DAplikacija->vratiDirRoot()."/Procesi/EvidencijaPrivilegija/HEvidencijaPrivilegija.class.php");
include_once($DAplikacija->vratiDirRoot()."/Procesi/EvidencijaPrivilegija/DEvidencijaPrivilegija.class.php");
$this->DklasaNavigacije=new DEvidencijaPrivilegija($Db);
$this->DklasaForme=new DEvidencijaPrivilegija($Db);
$this->HtmlKlasaForme=new HEvidencijaPrivilegija('','');
}
function Prikazi()
{
$podaciListe=$this->DklasaForme->VratiListuLista();
$listaJs=$this->HtmlKlasaForme->VratiStabloCheckBox($podaciListe);
header('Content-Type: text/xml');
echo"
]]>
";
}
function VratiFilter()
{
global $DAplikacija,$Db;
include_once($DAplikacija->vratiDirRoot().'/Procesi/RadnikFunkcija/DradnikFunkcija.class.php');
$rf=new DRadnikFunkcija($Db);
$rf->Dodeliparametre($this->KParametri);
$podaci=$rf->VratiPodaci();
$HtmlKod=iconv("windows-1250","UTF-8",$this->HtmlKlasaForme->VratiListuRadnika($podaci["Podaci"]));
header('Content-Type: text/xml');
echo"
";
}
function Listaj()
{
//$podaci=$this->DklasaForme->VratiPodaci();
//$HtmlForma=$this->HtmlKlasaForme->VratiFormu();
$HtmlFilter=$this->HtmlKlasaForme->VratiFormuFilter();
//$HtmlKod=$this->HtmlKlasaForme->VratiListu($podaci);
$tekst=iconv("windows-1250","UTF-8","Briši označene");
header('Content-Type: text/xml');
echo"
Yahoo!',
submenu: {
id: \"yahoo\",
zindex:100,
itemdata: [
\"O tehnologiji\",
\"WEB tim info\",
\"Kontakt\"
]
}
},
{
text: \"Sifarnici\",
submenu: {
id: \"sifarnici\",
zindex:100,
itemdata: [
{ text: \"Privilegija\", url:\"http://lotp-bm/index.php?lui=1\" },
{ text: \"Vrsta privilegije\", url:\"http://lotp-bm/index.php?lui=2\" },
{ text: \"Funkcija\", url:\"http://lotp-bm/index.php?lui=3\" },
]
}
},
{
text: \"Administracija\",
submenu: {
id: \"admin\",
zindex:100,
itemdata: [
{ text: \"Radnik-Funkcija\", url:\"http://lotp-bm/index.php?lui=5\" },
{ text: \"Funkcija-Privilegija\", url:\"http://lotp-bm/index.php?lui=6\" },
]
}
},
{
text: \"Evidencija\",
submenu: {
id: \"evidencija\",
zindex:100,
itemdata: [
{ text: \"Evidencija privilegija\", url:\"http://lotp-bm/indextest.php?lui=7\" },
]
}
}
];
/*
Instantiate a MenuBar: The first argument passed to the
constructor is the id of the element to be created; the
second is an object literal of configuration properties.
*/
var oMenuBar = new YAHOO.widget.MenuBar(\"mymenubar\", {
lazyload: true,
itemdata: aItemData,
zindex:100
});
/*
Since this MenuBar instance is built completely from
script, call the \"render\" method passing in a node
reference for the DOM element that its should be
appended to.
*/
oMenuBar.render(document.body);
// Add a \"show\" event listener for each submenu.
function onSubmenuShow() {
var oIFrame,
oElement,
nOffsetWidth;
// Keep the left-most submenu against the left edge of the browser viewport
if (this.id == \"yahoo\") {
YAHOO.util.Dom.setX(this.element, 0);
oIFrame = this.iframe;
if (oIFrame) {
YAHOO.util.Dom.setX(oIFrame, 0);
}
this.cfg.setProperty(\"x\", 0, true);
}
/*
Need to set the width for submenus of submenus in IE to prevent the mouseout
event from firing prematurely when the user mouses off of a MenuItem's
text node.
*/
if ((this.id == \"filemenu\" || this.id == \"editmenu\") && YAHOO.env.ua.ie) {
oElement = this.element;
nOffsetWidth = oElement.offsetWidth;
/*
Measuring the difference of the offsetWidth before and after
setting the \"width\" style attribute allows us to compute the
about of padding and borders applied to the element, which in
turn allows us to set the \"width\" property correctly.
*/
oElement.style.width = nOffsetWidth + \"px\";
oElement.style.width = (nOffsetWidth - (oElement.offsetWidth - nOffsetWidth)) + \"px\";
}
}
// Subscribe to the \"show\" event for each submenu
oMenuBar.subscribe(\"show\", onSubmenuShow);
//kraj menu
// Setup constants
});
})();
// Setup constants
// QUIRKS FLAG, FOR BOX MODEL
var IE_QUIRKS = (YAHOO.env.ua.ie && document.compatMode == \"BackCompat\");
// UNDERLAY/IFRAME SYNC REQUIRED
var IE_SYNC = (YAHOO.env.ua.ie == 6 || (YAHOO.env.ua.ie == 7 && IE_QUIRKS));
// PADDING USED FOR BODY ELEMENT (Hardcoded for example)
var PANEL_BODY_PADDING = (10*2) // 10px top/bottom padding applied to Panel body element. The top/bottom border width is 0
var panel = new YAHOO.widget.Panel('demo', {
draggable: false,
close: false,
underlay: 'none',
width: '950px',
zindex:0,
xy: [20, 29]
});
panel.setHeader('OTP banka - BM (Benefits Management) administrativni modul');
panel.setBody('');
panel.beforeRenderEvent.subscribe(function() {
YAHOO.util.Event.onAvailable('layout', function() {
YAHOO.sifarnik = new YAHOO.widget.Layout('layout',{
height: 547,
width: 920,
units: [
{ position: 'top', height: 38, resize: false, body: '', gutter: '2' },
{ position: 'left', width: 230, resize: true, body: '', gutter: '0 5 0 2', minWidth: 250, maxWidth: 300},
{ position: 'center', body: 'podaciG', gutter: '0 2 0 0' ,scroll:'true' },
{ position: 'right', width: 408, resize: false, body: '
', gutter: '0 5 0 2', minWidth: 250, maxWidth: 300,scroll:'true' }
]
});
YAHOO.sifarnik.on('render', function() {
var l=YAHOO.sifarnik.getUnitByPosition('center');
l.set('body','');
var l=YAHOO.sifarnik.getUnitByPosition('left');
l.set('body','');
var pretraga = new YAHOO.widget.Module(\"pretraga\");
pretraga.setHeader(\"Filter\");
pretraga.setBody(response.getElementsByTagName('htmlFilterForma')[0].firstChild.data);
pretraga.render(\"prt\");
var listaR = new YAHOO.widget.Module(\"listaR\");
listaR.setHeader(\"Lista radnika\");
listaR.setBody('');
listaR.render(\"LRadnika\");
var oNadji = new YAHOO.widget.Button({
label:\"Prikazi\",
id:\"prikazi\",
container:\"filterDugmic\" });
oNadji.on(\"click\", function(){St.ProcesirajFormuY(600,'formaFilter')});
});
YAHOO.sifarnik.render();
});
});
panel.render();
]]>
";
}
function VratiPodatke()
{
$idRadnik=$this->KParametri["Post"]["idRadnik"];
$podaci=$this->DklasaForme->VratiListuFunkcijaRadnika($idRadnika);
$HtmlKod=$this->HtmlKlasaForme->VratiListuFunkcija($podaci);
header('Content-Type: text/xml');
echo"
";
}
function Snimi()
{
$id=$this->DklasaForme->Snimi($this->KParametri);
$podaci=$this->DklasaForme->VratiPodaci();
$HtmlKod=$this->HtmlKlasaForme->VratiListu($podaci);
header('Content-Type: text/xml');
echo"
";
}
function Brisi()
{
$this->DklasaForme->Brisi($this->KParametri);
$podaci=$this->DklasaForme->VratiPodaci();
$HtmlKod=$this->HtmlKlasaForme->VratiListu($podaci);
header('Content-Type: text/xml');
echo"
";
}
function PripremiFormuZaInsert()
{
$HtmlForma=$this->HtmlKlasaForme->VratiFormu();
$podaciListe=$this->DklasaForme->VratiListuLista();
$listaJs=$this->HtmlKlasaForme->VratiStabloCheckBox($podaciListe);
header('Content-Type: text/xml');
echo"
]]>
";
}
/**
* Vraca listu na osnovu id radnika iz prethodnog metoda.
* Klik na stavku ove liste vraca istorijat promene privilegije
*
*/
function VratiListuPrivilegija()
{
$idRadnik=$this->KParametri["Get"]["idRadnik"];
$podaci=$this->DklasaForme->VratiListuFunkcijaRadnika($idRadnik);
$HtmlKod=$this->HtmlKlasaForme->VratiListuFunkcija($podaci);
header('Content-Type: text/xml');
echo"
";
}
function VratiPregledPromena()
{
$idRadnik=$this->KParametri["Get"]["idRadnik"];
$idPrivilegija=$this->KParametri["Get"]["idPrivilegija"];
$podaci=$this->DklasaForme->VratiPregledPromena($idRadnik,$idPrivilegija);
$HtmlKod=$this->HtmlKlasaForme-> VratiListuPromena($podaci);
$tekst=iconv("windows-1250","UTF-8","Zaduži");
$tekst1=iconv("windows-1250","UTF-8","Razduži");
header('Content-Type: text/xml');
echo"
";
}
}
?>