%PDF- %PDF-
Direktori : /var/www/html/buggydubrovnik.com/prodaja/ |
Current File : /var/www/html/buggydubrovnik.com/prodaja/excursions.php |
<?php if (session_id() == ""){ session_cache_expire(30); session_start(); } if(!isset($_SESSION['userx']) && !isset($_SESSION['user'])) {header( 'Location: auth.php' ) ; exit;} $pop = 0; if(isset($_SESSION['userx']) || ((isset($_SESSION['user']))&&($_SESSION['user']=='sve'))) {$pop=1;} ?> <!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" /> <script type="text/javascript" src="businesslayer.js" ></script> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <script src="jquery.js"></script> <link href="glyphicons.css" type="text/css" rel="stylesheet"/> <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 type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script> <div id="example7.1" style="height: 200px;"></div> <script> var targetWin; function PopupCenter(pageURL, title,w,h) { var left = (screen.width/2)-(w/2); var top = ((screen.height-100)/2)-(h/2); targetWin = window.open (pageURL, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left); } var timer; function pokrenitimer(){ timer = setInterval(function() { console.log("checking..??") if(targetWin.closed) { clearInterval(timer); popisIzleta(datko); } }, 1000); } </script> <script type="text/javascript" > <!-- var dA = new Array(); var dB = new Array(); var izletipopis = new Array(); var cala=""; var datko; function IzbrisiIzletOrganizacija(vrijednost) { if(confirm("Izbrisati putni nalog? ")){ MakeRequestDeleteIzletOrganizacija(vrijednost); popisIzleta(datko); } } //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 = ""; var rdatum=""; //za prikaz stranice function PrikaziPrvu() { var dat = new Date(); dat.setDate(dat.getDate()); } var datumi=new Array(); var podaci=new Array(); function PrikaziDatume1() { var datumsutra = new Date(); var godina = String(datumsutra.getFullYear()); var mj= datumsutra.getMonth()+1;if(mj<10){mj="0"+mj;} var dan = datumsutra.getDate();if(dan<10){dan="0"+dan;} datumsutra1=' '+godina+mj+dan; popisIzleta(datumsutra1); PrikaziDatume('<?php echo $pop ?>'); //window.prompt("Copy to clipboard: Ctrl+C, Enter", vari); datumi = ParsirajSve(vari); //alert(vari); PopuniKalendar(); if (cala = dispCal(godina,mj)) {document.getElementById('calendar').innerHTML = cala; return false;} } loaded('calendar',start); //MakeRequestDeleteIzlet(id); var tb = 't'; // top or bottom (t or b) var headbg = '#002951'; // table heading background colour var todaybg = '#FF8822'; // current selected date background colour var textclr = '#000000'; // text colour var linkclr = 'red'; // link text colour var noMessage = 'Nema izleta za odabrani datum'; // message to display when no entry in array // first 8 characters in ccyymmdd format for single date events // first 8 characters in 0000mmdd format for every year events function popisIzleta(datum) { datko = datum; //alert(datum); document.getElementById('dropdown').innerHTML="Loading..."; datumbaza=datumrazdvoji(datum); datumnaslov=datumbaza.split("-"); MakeRequestLoadPKIzletDT(datumbaza); //alert(vari); izletipopis = ParsirajSve(vari); document.getElementById('dropdown').innerHTML='<span style="font-family:Verdana, Geneva, sans-serif; font-size:24px;color:orange;"><b>'+datumnaslov[2]+'.'+datumnaslov[1]+'.'+datumnaslov[0]+' </b>:</span><br /><br /> '; var ispisdodaj = ''; var privatniboja= ''; var chartData=[] var colorArray=[] var spaces=""; for(i=0;i<izletipopis['brojac'];i++) { privatniboja= ''; MakeRequestLoadPKIzletBRLJ(izletipopis['idizlet'+i]); ispisdodaj= vari; MakeRequestLoadPKIzletVODI(izletipopis['idizlet'+i]); ispisdodaj+=vari; izletvrijemeod=izletipopis['datum'+i].split(' '); vrijemeOdSplit=izletvrijemeod[1].split(':') izletvrijemedo=izletipopis['trajanje'+i].split(' '); vrijemeDoSplit=izletvrijemedo[1].split(':') chartData.push([ datumnaslov[2]+'.'+datumnaslov[1]+'.'+datumnaslov[0], izletvrijemeod[1].slice(0, -3)+"-"+izletvrijemedo[1].slice(0, -3)+" ("+ispisdodaj+")", new Date(0, 0, 0, parseInt(vrijemeOdSplit[0]), parseInt(vrijemeOdSplit[1]), parseInt(vrijemeOdSplit[2])), new Date(0, 0, 0, parseInt(vrijemeDoSplit[0]), parseInt(vrijemeDoSplit[1]), parseInt(vrijemeDoSplit[2])), '<div style="z-index: 999; font-size: 1.2em"><h3 style="font-weight: 700; padding: 0.5em; background-color: #FF6600; color: #ffffff; font-size: 1.5em; text-transform: uppercase">'+izletipopis['naziv'+i]+"</h3><br/>" + '<b>'+izletvrijemeod[1].substring(0,5)+' - '+izletvrijemedo[1].substring(0,5)+'</b> <br/>'+ " <b>Broj buggy-a: </b> "+ispisdodaj+"<br/><br/>" + '<a style="color: #FF6600; font-weight: 700" href="izlet.php?id=' +izletipopis['idizlet'+i]+'">DODAJ REZERVACIJU</a><br/></div>']) if(parseInt(izletipopis['broj'+i])==4) { privatniboja= 'style="background-color:LightPink"'; colorArray[chartData[i][1]]="#FFB6C1"; } else colorArray[chartData[i][1]]="#ffa500"; spaces+=" "; document.getElementById('dropdown').innerHTML+='<div style="width:100%; float:left;margin:0 auto;text-align:center;"><div class="divizletapopis" '+privatniboja+'><a href="izlet.php?id='+izletipopis['idizlet'+i]+'"> <span style="font-size:14px;"><b>'+izletvrijemeod[1].substring(0,5)+' - '+izletvrijemedo[1].substring(0,5)+' '+izletipopis['naziv'+i]+'</b></span><span style="background:white;font-size:24px;float:right;color:orange;padding:0px;">'+ispisdodaj+' </span></a> </div></div>'; } document.getElementById('dropdown').innerHTML+='<div style="width:100%; float:left;margin:0 auto;text-align:center;"><div class="divizletapopis" style="background-color:green"><a href="javascript:void(0);" onclick="PopupCenter(\'noviizlet.php?datum='+datumbaza+'\', \'myPop1\',290,290); pokrenitimer();"> <span style="font-size:14px;"><b>Dodaj novi izlet</b></span></a></div></div><br><br>'; $(document).ready(chartInit(chartData, colorArray)) } var gloaded=false; function chartInit(data, colorArray) { if(gloaded) drawChart(); else { google.charts.load('current', {'packages': ['timeline']}); google.charts.setOnLoadCallback(drawChart); } function drawChart() { gloaded=true; var container = document.getElementById('timeline-tooltip'); var chart = new google.visualization.Timeline(container); var dataTable = new google.visualization.DataTable(); dataTable.addColumn('string', 'Name') dataTable.addColumn('string', 'Label') dataTable.addColumn('date', 'Start'); dataTable.addColumn('date', 'End'); dataTable.addColumn({type: 'string', role: 'tooltip'}); dataTable.addRows(data); console.log(colorArray) var options = { colors:['#ffa500'], timeline: {showRowLabels: false, barLabelStyle: { color: "#ffffff" }, groupByRowLabel: false}, tooltip: {isHtml: true} }; function setColor(elem,newColor) { console.log("setting color"); var rect = elem.previousSibling; var rTitle = rect.innerHTML; rect.setAttribute("fill",newColor); } chart.draw(dataTable, options); function setColors(){ var elements = document.getElementsByTagName("text"); for(var el in elements) { if(typeof colorArray[elements[el].innerHTML] != "undefined") { setColor(elements[el],colorArray[elements[el].innerHTML]); } } } setColors(); function myHandler(e){ if(e.row != null){ $(".google-visualization-tooltip:not([clone])").html(dataTable.getValue(e.row,4)).css({width:"auto",height:"auto"}); } } google.visualization.events.addListener(chart, 'onmouseover', myHandler); google.visualization.events.addListener(chart, 'onmouseout', setColors); google.visualization.events.addListener(chart, 'select', function(e) { var tooltip = document.querySelector('.google-visualization-tooltip:not([clone])'); if (chart.ttclone) { chart.ttclone.parentNode.removeChild(chart.ttclone) } chart.ttclone = tooltip.cloneNode(true); chart.ttclone.setAttribute('clone', true); tooltip.parentNode.insertBefore(chart.ttclone, chart.tooltip); setColors() }); } } function PopuniKalendar() { var danas = new Date(); var mjesec = danas.getMonth(); var godina = danas.getFullYear(); var godina1 = godina; var mjesec1 = mjesec+1; if (mjesec==12) {godina1+=1;mjesec1=1;} var x = 0; dA = []; dB = []; for(i=0;i<datumi['brojac'];i++) {datumispis=datumzajedno(datumi['datum'+i]); //alert(datumispis); //alert(datumi['briz'+i]); dA[i]=datumispis+' '+datumispis; dB[i]=(datumi['briz'+i]); } var start = new Date("01/11/2016"); var end = new Date("01/01/2018"); while(start < end){ datumispis= start.toISOString().substr(0, 10).replace('-','').replace('-',''); dA[i]=datumispis+' '+datumispis; dB[i]=0; var newDate = start.setDate(start.getDate() + 1); start = new Date(newDate); i++; } return true; } //--> // dA[x++] = "20060610 New Event Calendar Started today"; // permission is granted to use this javascript provided that the below code is not altered var pageLoaded = 0; window.onload = function() {pageLoaded = 1;} function loaded(i,f) { if (document.getElementById(f) && document.getElementById(i) != null) f(); else if (!pageLoaded) setTimeout('loaded(\''+i+'\','+f+')',100); } function monthlength(month,year) {var dd = new Date(year, month, 0);return dd.getDate();} var moy = ['Siječanj','Veljača','Ožujak','Travanj','Svibanj','Lipanj','Srpanj','Kolovoz','Rujan','Listopad','Studeni','Prosinac']; var today = new Date(); var selDate = today.getFullYear()+getmmdd(today.getMonth()+1,today.getDate()); function dispCal(yy,mm) { if (mm < 0 || mm > 12) {alert('month must be between 1 and 12'); return false;} if (yy != 0 && (yy < 1901 || yy > 2100)) { alert('year must be after 1900 and before 2101'); return false; } var dow = ['Ned','Pon','Uto','Sri','Čet','Pet','Sub']; var calendar = new Date(); var today = calendar.getDate(); calendar.setDate(1); if (yy > 1900) calendar.setFullYear(yy); if (mm > 0) calendar.setMonth(mm - 1); var yy = year = calendar.getFullYear(); var month = calendar.getMonth(); calendar.setDate(today); var weekday = calendar.getDay(); var daysInMonth = monthlength(month+1,year); var hilite_start = '<td style="background:' + todaybg + '; color=#fff!important" align="center"><b>'; var ima_start = '<td style="background:#DFF5F5" align="center"><b>'; var td_start = '<td align="center">'; var cal = '<div id="cal"><div ><table border="0" cellspacing="0" cellpadding="2" align="center"><tr><td class="calendar-header" colspan="7" style=" color:#fff;" align="center"><b>' + moy[month] + ' ' + year + '<\/b><\/td><\/tr><tr>'; for(dex=0; dex < 7; dex++) { cal += td_start + dow[dex] + '</td>'; } cal += '<\/tr><tr>'; var day2 = today; for (dex = today; dex > 6; dex -=7) day2 = dex; weekday -= day2 - 1; while (weekday < 0) weekday += 7; for(dex=0; dex < weekday; dex++) cal += td_start + ' <\/td>'; for(dex=1; dex <= daysInMonth; dex++) { if(weekday == 7) {cal += '</tr><tr>'; weekday = 0;} if(selDate==year+getmmdd(month+1,dex)) {cal += hilite_start +'<span '+clickDate(dex,month,year) + '>'+ dex + '<\/span><\/b><\/td>';} else if (nextDate1(year + getmmdd(month+1,dex))>0) {cal += ima_start +'<span '+clickDate(dex,month,year) + '>'+ dex + '<\/span><\/b><\/td>';} else{ cal += td_start + '<span '+clickDate(dex,month,year) + '>' + dex + '<\/span><\/td>';} weekday += 1; } for(dex=weekday; dex < 7; dex++) cal += td_start + ' <\/td>'; cal += '<\/tr><\/table>'; if (document.getElementById) { var mmb = month; mm = month + 1; var yya = yyb = yy; if (mmb <1) {mmb += 12; yyb--;} var mma = month + 2; if (mma > 12) {mma -= 12; yya++;} var yb = yy -1; var ya = yy +1; cal += '<br /><table style="color: #FF6600!important;" align="center" border="0" cellspacing="0" cellpadding="2"><tr><td height="20px;" align="left"><a href="#" onclick="if (cala = dispCal('+yb+','+mm+')) {document.getElementById(\'cal\').innerHTML = cala; return false;}"><span class="glyphicon glyphicon-arrow-left" style="margin-right:20px;" border="0" src="slike/rw1.png" ></span></a><a href="#" onclick="if (cala = dispCal('+yyb+','+mmb+')) {document.getElementById(\'cal\').innerHTML = cala; return false;}"><span border="0" class="glyphicon glyphicon-circle-arrow-left" /></a></td><td width="0"></td><td align="left"></td><td width="70px" align="right" width="0"><a href="#" onclick="if (cala = dispCal('+yya+','+mma+')) {document.getElementById(\'cal\').innerHTML = cala; return false;}"><span class="glyphicon glyphicon-circle-arrow-right" border="0" src="slike/ff.png" ></span></a><a href="#" onclick="if (cala = dispCal('+ya+','+mm+')) {document.getElementById(\'cal\').innerHTML = cala; return false;}"><span class="glyphicon glyphicon-arrow-right" style="margin-left:20px;" border="0" src="slike/ff1.png" ></span></a></td></tr></table>'; } else {cal += '<div> </div><\/div>';} cal += '</div>'; return cal; } function start() { var x = '<div id="calDate" style="border:1pt solid #cccccc;width:238px"><\/div>'; var y = ''; if (tb == 't') y = x + dispCal(0,0); else y = dispCal(0,0) + x; document.getElementById('calendar').innerHTML = y; ev(); } function clickDate(day, month, year) { var ct = nextDate(year + getmmdd(month+1,day)); if (ct == '') ct = nextDate('0000' + getmmdd(month+1,day)); if (ct == '') return 'style="color:'+textclr+'"'; else return 'style="cursor:pointer;color:'+linkclr+'" onclick="selDate = '+year+ getmmdd(month+1,day)+'; isDate(' + day + ',' + month + ',' + year + ');return false;"'; } function isDate(dayVal,monthVal,yearVal) { var ct = nextDate(yearVal + getmmdd(monthVal+1,dayVal)); if (ct == '') ct = nextDate('0000' + getmmdd(monthVal+1,dayVal)); if (ct == '') ct = noMessage;popisIzleta(ct); return false; } function nextDate(yymmdd) { var x = dA.length; for (var i = 0; i < x; i++) { if (dA[i].substr(0,8) == yymmdd) return dA[i].substr(8); //if (dA[i].substr(0,8) == yymmdd) return dA[i].substr(8); } return ''; } function nextDate1(yymmdd) { var x = dA.length; for (var i = 0; i < x; i++) { if (dA[i].substr(0,8) == yymmdd) return dB[i]; } return 0; } function getmmdd(mm,dd) { return (mm > 9 ? '' + mm : '0' + mm) + (dd > 9 ? dd : '0' + dd); } function ev() { var ct = nextDate(selDate); var ct = nextDate(selDate); if (ct == '') ct = nextDate('0000' + selDate.substr(4)); if (ct == '') ct = noMessage; document.getElementById('calDate').innerHTML = '' ; } </script> <link href="style.css" rel="stylesheet" type="text/css" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Buggy Safari - Izleti</title> </head> <body onload="javascript:PrikaziDatume1();" 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"> Glavni izbornik</a> </div> <div class="izbornik"><span class="glyphicon glyphicon-map-marker"> </span><a href="excursions.php"> Izleti početna</a> </div> <!-- <div class="izbornik"><img src="slike/uizlet.png" style="vertical-align:middle" /> <a href="krizlet.php"> Kreiraj izlet</a> </div> <div class="izbornik"><img src="slike/pin.png" style="vertical-align:middle" /> <a href="unmjkuplj.php"> Mjesta kupljenja</a> </div> --> <div class="izbornik"><span class="glyphicon glyphicon-user"></span> <a href="unpart.php"> Postavke</a> </div> <!-- <div class="izbornik"><img src="slike/bus.png" style="vertical-align:middle" /> <a href="unvozila.php"> Unos vozila</a> </div> <div class="izbornik"><img src="slike/vodic.png" style="vertical-align:middle" /><a href="unvodica.php"> Unos vodiča</a> </div> <div class="izbornik"><img src="slike/wheel.png" style="vertical-align:middle" /> <a href="unvozaca.php"> Unos vozača</a> </div> --> </div> <div id="tijelo"><div style="width:100%; margin-bottom:25px; font-size:18px; color:#333; text-align:left; padding-top:20px;"> <h1 class="title">IZLETI</h1><!--<span style="color:#F00">Sustav se nadograđuje i mogući su prekidi u radu aplikacije. Ukoliko dođe do prekida zazovite na 091 6126613.</span><br /><br /><span style="font-size:12px; text-decoration:none;"></span>--></div> <div id="calendar"></div> <br/> <div id="timeline-tooltip" style="height: 400px; margin-right: 5px" ></div> <div id="dropdown"> <span style="font-family:Verdana, Geneva, sans-serif; font-size:14px;"><b>Popis izleta :</b></span><br /><br /> </div> </div> </div> </body> </html>