%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /var/www/html/buggydubrovnik.com/prodaja/
Upload File :
Create Path :
Current File : //var/www/html/buggydubrovnik.com/prodaja/unmjkuplj.php

<?php
	if (session_id() == ""){
		session_cache_expire(30);
		session_start();
	}
		if(!isset($_SESSION['userx']) && !isset($_SESSION['user']))
 		{header( 'Location: auth.php' ) ; exit;}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Unos mjesta kupljenja</title>
<link href="style.css" rel="stylesheet" type="text/css" />
    <link href="glyphicons.css" rel="stylesheet" type="text/css"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="jquery.js"></script>
    <script>
        $(document).ready(function(){
            var sidemenu=$("#izborniklijevo")
            $("#toggleMenuButton").on("click", function(){
                if(sidemenu.hasClass("active")) {
                    sidemenu.removeClass("active")
                    $(this).removeClass("active")
                }
                else {
                    sidemenu.addClass("active")
                    $(this).addClass("active")
                }
            })
        })
    </script>

<script language="JavaScript" type="text/javascript" src="businesslayer.js"></script>
<style>
    #mjkupdiv div input, #vrkupdiv div input {
        width: 60% !important;
        height: 30px!important;
    }
    #vanredno {
        float: none!important;

    }
    .half {
        display: inline-block;
        width: 49%;
    }
    #desno {
        float:none;
        position:absolute;
        top:10px;
        background: none!important;
        display: block;
        right: 0;
    }

    .checkbox label {
        width: 15%;
    }
    .checkbox input {
        width: auto;
    }
    label {
        display: inline-block;
        width: 25%;
        text-align: left;
    }
    select {
        font-size: 1.3em;
    }
    input {
        width: 60%;
        font-size: 1.5em;
    }
    .bigger-glyphicon {
        margin-left: 5px;
        font-size: 1.5em;
        font-weight: 700;
    }
    .align-left {
        text-align: left;
    }
    #sPartneri {
        font-size: 1.4em!important;
    }
    #tijelo {
        background: none;
    }
    div {
        margin-top: 0.5em;
    }
    .padded {
        padding: 1em;
    }
    @media (max-width: 768px) {

        #desno {
            float: none!important;
            position: relative;

        }
        #tijelo {
            margin-top: 100px!important;
            float: none!important;
        }
        input {
            width: 90%;
        }
        label {
            display: block;
            width: 100%;
        }
    }

</style>
<script type="text/javascript">
//Parsiranje rezultata
function ParsirajSve(value)
{
	value = value.split("##");
	for (var i = 0; i < value.length; i++)
	{
	var tmp = value[i].split("==");
	value[tmp[0]] = tmp[1];
	}
	return value;
}


var vari = "";

//za prikaz stranice
function Prikazi()
{
	document.unos.naziv.value = "";
	
	  document.unos.id.value="";
	document.getElementById('bunesi').style.display="inline";
	document.getElementById('bpromijeni').style.display="none";
var formObj = document.forms['partner'];
formObj.sPartneri.options.length = 0;

	MakeRequestLoadAllProdajnoMjSVI();
	////`IDProdajnoMj`,`naziv`
	
	
	podaci = ParsirajSve(vari);
	
	
	var opt = document.createElement("option");document.getElementById("sPartneri").options.add(opt);
		opt.text = "ODABERITE MJESTO KUPLJENJA";
        opt.value = "-1";
		
		var opt = document.createElement("option");document.getElementById("sPartneri").options.add(opt);
		opt.text = "----------------------------------------";
        opt.value = "-1";
		
		for(i=0;i<podaci['brojac'];i++)
	{var opt = document.createElement("option");
document.getElementById("sPartneri").options.add(opt);
		 opt.text = podaci['naziv'+i];
        opt.value = i;
			

		} 
}

function PrikaziJednog()
{
	document.getElementById('bunesi').style.display="none";
	document.getElementById('bpromijeni').style.display="inline";
	var selectElement1 = document.getElementById('sPartneri');
var selectedValue1 = selectElement1[selectElement1.selectedIndex].value;
rbr=selectedValue1;
if(rbr!=-1){	
	 document.unos.naziv.value = podaci['naziv'+rbr];
	
	  document.unos.id.value=podaci['idprodajnomj'+rbr];}
}

function unesi()
{if(confirm("Unijeti novo mjesto kupljenja u bazu? ")){
	MakeRequestInsertProdajnoMj(0,0,document.unos.naziv.value,2,"",0);
	
	var idpm = vari;//Za svki izlet unijeti to mjesto kupljenja!!!!!!
	
	
	 MakeRequestLoadAllIzletTip();
   var podaci1 = ParsirajSve(vari);
	for(i=0;i<podaci1['brojac'];i++){
		MakeRequestInsertIzletTipMjVrijeme( 0, podaci1['idizlettip'+i], idpm, '00:00', 1);
		//alert(vari);		
		}
	
	//MakeRequestInsertIzletTipMjVrijeme( 0, idizlettip, idprodajnomj, vrijeme, 1)
	alert("Mjesto kupljenja uspješno uneseno!");
	Prikazi();}
	
}
function brisimjkupljenja(){
	MakeRequestDeleteProdajnoMj(document.unos.id.value);Prikazi();
	}

function promijeni()
{
	if(confirm("Potvrditi promjene? ")){
	Id=document.unos.id.value;
	MakeRequestUpdateProdajnoMj( Id, 0,document.unos.naziv.value,  2,  "", 0);
	alert("Promjena je uspješno izvršena !");
	Prikazi();}
}





</script>

</head>


<body onload="Prikazi();" style=" margin:0 auto;">

<div id="gornjatraka">
    <span id="toggleMenuButton"></span>
<div style="float:right; margin-right:5px;padding-top:55px;">Prijavljeni ste kao <b><?php if (isset($_SESSION['user'])){ echo $_SESSION['user'];} else{  echo $_SESSION['userx'];}?></b></div>
</div>

<div id="main">
<div id="izborniklijevo">
    <div class="izbornik"><span class="glyphicon glyphicon-home"></span> <a href="start.php">&nbsp;Glavni izbornik</a>
    </div>
    <div class="izbornik"><span class="glyphicon glyphicon-map-marker"></span> <a href="excursions.php">&nbsp;Izleti početna</a>
    </div>

    <div class="izbornik"><span class="glyphicon glyphicon-pencil"></span> <a href="krizlet.php">&nbsp;Kreiraj izlet</a>
    </div>
    <div class="izbornik"><span class="glyphicon glyphicon-flag"></span> <a href="unmjkuplj.php">&nbsp;Mjesta kupljenja</a>
    </div>

    <div class="izbornik"><span class="glyphicon glyphicon-briefcase"></span> <a href="unpart.php">&nbsp;Unos partnera</a>
    </div>


    <div class="izbornik"><span class="glyphicon glyphicon-plane"></span> <a href="unvozila.php">&nbsp;Unos vozila</a>
    </div>

    <div class="izbornik"><span class="glyphicon glyphicon-user"></span><a href="unvodica.php"> &nbsp;Unos vodiča</a>
    </div>

    <div class="izbornik"><span class="glyphicon glyphicon-road"></span> <a href="unvozaca.php">&nbsp;Unos vozača</a>
    </div>

</div>
<div id="tijelo"><h1 class="title">UNOS/UREĐIVANJE MJESTA KUPLJENJA</h1></div>
    <div id="desno"><button class="button" src="slike/unosnovog.jpg" onclick="javascript:location.reload(true);" style="cursor:pointer;" >UNOS NOVOG</button>
    </div>

    <div>
        <form name="partner"><select id="sPartneri" onchange="PrikaziJednog();"></select><a href="javascript:brisimjkupljenja();"><span class="glyphicon glyphicon-remove-circle bigger-glyphicon orange" style="vertical-align:middle;" border="0"></span></a></form>
    </div>
    <div class="linija"></div>
<div id="dropdown">
<form name="unos" action="">
<div><label>Naziv : </label><input name="naziv" type="text" /></div>
<input  name="id" type="hidden"  />
<div class="linija"></div>
<div id="bpromijeni"><button class="button" onclick="javascript:promijeni();" style="cursor:pointer;"  >SPREMI</button></div> &nbsp;
    <div id="bunesi"><button class="button" onclick="javascript:unesi();" style="cursor:pointer;"  >UNESI</button></div>
</form>

</div>

<div id="skriveni"  style="visibility:hidden"></div>

</div>
</div>


</body>
</html>

Zerion Mini Shell 1.0