Notice (8) : Undefined index: HTTP_ACCEPT_ENCODING [APP/View/Layouts/default.ctp , line 7 ]Code Context $CDN = "//d3ptx09acki40b.cloudfront.net";
if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')) { $viewFile = '/var/www/makankaki.com/public_html/app/View/Layouts/default.ctp'
$dataForView = array(
'title_for_layout' => 'Makan Kaki',
'content_for_layout' => '<pre class="cake-error"><a href="javascript:void(0);" onclick="document.getElementById('cakeErr593cb37220d27-trace').style.display = (document.getElementById('cakeErr593cb37220d27-trace').style.display == 'none' ? '' : 'none');"><b>Notice</b> (8)</a>: Undefined index: HTTP_ACCEPT_ENCODING [<b>APP/View/Pages/main.ctp</b>, line <b>4</b>]<div id="cakeErr593cb37220d27-trace" class="cake-stack-trace" style="display: none;"><a href="javascript:void(0);" onclick="document.getElementById('cakeErr593cb37220d27-code').style.display = (document.getElementById('cakeErr593cb37220d27-code').style.display == 'none' ? '' : 'none')">Code</a> <a href="javascript:void(0);" onclick="document.getElementById('cakeErr593cb37220d27-context').style.display = (document.getElementById('cakeErr593cb37220d27-context').style.display == 'none' ? '' : 'none')">Context</a><pre id="cakeErr593cb37220d27-code" class="cake-code-dump" style="display: none;"><code><span style="color: #000000">$CDN = "//d3ptx09acki40b.cloudfront.net";</span></code>
<code><span style="color: #000000"></span></code>
<span class="code-highlight"><code><span style="color: #000000">if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')){</span></code></span></pre><pre id="cakeErr593cb37220d27-context" class="cake-context" style="display: none;">$viewFile = '/var/www/makankaki.com/public_html/app/View/Pages/main.ctp'
$dataForView = array(
'title_for_layout' => 'Makan Kaki'
)
$title_for_layout = 'Makan Kaki'
$CDN = '//d3ptx09acki40b.cloudfront.net'</pre><pre class="stack-trace">include - APP/View/Pages/main.ctp, line 4
View::_evaluate() - CORE/Cake/View/View.php, line 923
View::_render() - CORE/Cake/View/View.php, line 886
View::render() - CORE/Cake/View/View.php, line 476
Controller::render() - CORE/Cake/Controller/Controller.php, line 956
Dispatcher::_invoke() - CORE/Cake/Routing/Dispatcher.php, line 193
Dispatcher::dispatch() - CORE/Cake/Routing/Dispatcher.php, line 161
[main] - APP/webroot/index.php, line 93</pre></div></pre>
<!-- Welcome Section
================================================================ -->
<link rel="stylesheet" type="text/css" href="//d3ptx09acki40b.cloudfront.net/tn3/skins/tn3e/tn3eb.css" />
<script type="text/javascript" src="//d3ptx09acki40b.cloudfront.net/tn3/js/jquery.tn3b.min.js"></script>
<script type="text/javascript" src="//d3ptx09acki40b.cloudfront.net/js/venuemgmt/venue_recommended_main.js"></script>
<!-- Content
================================================================ -->
<div style="position: relative; top: -90px; height: 450px; padding-bottom: 0; margin-bottom: 0; text-align: center; padding-top: 50px;" class="banners-wrap hide-mobile">
<div id="tagline">The easiest way to organize gathering with your friends</div>
<br/><br/>
<div style="float: left; margin-left: 150px;">
<iframe width="650" scrolling="no" height="366" frameborder="0" src="//www.youtube.com/embed/qEWsiufD6Kc?rel=0" frameborder="0" allowfullscreen></iframe>
</div>
<div>
<div id="google_play_store">
<a href="https://play.google.com/store/apps/details?id=com.makankaki.makankaki" target="play_store"><img src="/img/playstore.png" alt="Play Store" width="452" height="160" /></a>
</div>
<div id="apple_app_store" style="margin-top: 50px;">
<a href="https://itunes.apple.com/app/id670547626" target="itunes_store"><img src="/img/itunes-download.png" alt="iTunes" width="453" height="156" /></a>
</div>
</div>
</div>
<div id="content-wrapper" class="content-wrapper" style="padding-bottom: 30px;">
<!-- Primary Content -->
<form action="/appointments/add" id="resform" class="form form__modal" method="post" accept-charset="utf-8"><div style="display:none;"><input type="hidden" name="_method" value="POST"/></div> <div class="container">
<div class="clearfix">
<div class="grid_1"> </div>
<div class="grid_7" style="text-align: center;">
<div id="detailsView">
<div class="box">
<div style="position: absolute; top: -10px; left: -10px;"><img src="//d3ptx09acki40b.cloudfront.net/images/step1_80.png" /></div>
<div class="form-msg" style="font-family: 'Jockey One',sans-serif; padding: 0px 0 0;">Suggest some venues</div>
<div><i>Search and add some venue suggestions</i></div>
<div class="field clearfix" style="padding-top: 20px;">
<div id="venueList" style="margin: 5px 5px; max-height: 200px; overflow-y: auto; text-align: left;">
<div style=" width: 221px; height: 120px; background-image: url('//d3ptx09acki40b.cloudfront.net/images/dummy_venue2.png'); background-repeat: no-repeat; opacity: 0.4; filter:alpha(opacity=40); cursor: pointer;" onclick="zoomVenue();">
</div>
</div>
<input type="hidden" id="venueSuggestionElem" name="data[Appointment][venuesuggestion]" value="[]" />
<div style="padding-top: 10px;">
<div id="searchbox-main">
<input class="input-small" type="text" id="venuesuggestion" value="" placeholder="Search a venue. E.g. starbucks"/>
</div>
<div id="countrysearch-main">
<input class="input-small" type="text" id="venuelocation" value="" placeholder="Preferred Location"/>
</div>
<div class="hide-mobile" style="margin-left: 10px; float: left; position: relative;">
<a href="javascript: doSearch();">
<img src="//d3ptx09acki40b.cloudfront.net/images/search_icon.png">
</a>
</div>
<div id="extender" style="height: 300px; display: none;">
</div>
</div>
</div>
</div>
<div class="spacer"></div>
<div class="clearfix box">
<div style="position: absolute; top: -10px; left: -10px;"><img src="//d3ptx09acki40b.cloudfront.net/images/step2_80.png" /></div>
<div class="form-msg" style="font-family: 'Jockey One',sans-serif; padding: 0px 0 0;">Suggest some dates</div>
<div><i>Select some possible dates</i></div>
<div id="scheduleList" style="margin: 5px 5px; max-height: 300px; overflow-y: auto; text-align: left;">
<div style="width: 90px; height: 90px; background-image: url('//d3ptx09acki40b.cloudfront.net/images/dummy_schedule.png'); background-repeat: no-repeat; opacity: 0.4; filter:alpha(opacity=40); cursor: pointer; padding-bottom: 10px;" onclick="zoomSchedule();">
</div>
</div>
<div>
<input class="input-small" type="text" id="scheduledatetime" name="data[Schedule][schedule_date]" value="" placeholder="Choose a date/time" />
<input type="hidden" id="scheduleSuggestionElem" name="data[Appointment][schedulesuggestion]" value="[]" />
<script>
$(document).ready(function() {
$('#scheduledatetime').datetimepicker({
format: 'Y-m-d H:i',
step: 5,
minDate: 0,
onSelectTime: addScheduleSuggestion,
inline: true
});
});
function zoomSchedule(){
$('#scheduledatetime').focus();
}
function zoomVenue(){
$('#venuesuggestion').focus();
}
scheduleSuggestions = [];
function addScheduleSuggestion() {
var d1 = $("#scheduledatetime").val();
if (d1 !== '') {
var found = false;
for (var i = 0; i < scheduleSuggestions.length; i++) {
if (scheduleSuggestions[i] === d1) {
found = true;
break;
}
}
if (!found) {
scheduleSuggestions.push(d1);
//console.log("size : " + scheduleSuggestions.length);
}
$("#scheduledatetime").val('');
$("#scheduledatetime").attr('placeholder', 'Suggest more date/time');
refreshScheduleSuggestions();
$('#scheduleSuggestionElem').val(JSON.stringify(scheduleSuggestions));
}
}
function removeScheduleSuggestion(index) {
scheduleSuggestions.splice(index, 1);
console.log("size : " + scheduleSuggestions.length);
refreshScheduleSuggestions();
$('#scheduleSuggestionElem').val(JSON.stringify(scheduleSuggestions));
}
function refreshScheduleSuggestions() {
var html = '<table>';
for (var i = 0; i < scheduleSuggestions.length; i++) {
var d1 = moment(scheduleSuggestions[i]);
//d1 = d1.format("MMMM Do YYYY, hh:mm a");
html += '<div style="width: 90px;float: left; height: 110px;"><div class="scheduleBox"><div style="position: relative; font-size: 10pt; top: 10px; color: white; width: 80px; text-align: center;text-shadow: none;">' + d1.format("MMM") + '</div><div style="position: relative; text-align: center; color: black; top: 20px; width: 80px; text-shadow: none; font-weight: bolder; font-size: 16pt;">' + d1.format('D') + '</div><div style="position: relative; text-align: center; color: black; top: 20px; width: 80px; text-shadow: none; font-size: 10pt;">' + d1.format('h:mm A') + '</div></div><div style="width: 90%; float: left; text-align: center;">(<a href="javascript:void(0)" onclick="removeScheduleSuggestion(' + i + ')">remove</a>)</div></div>';
}
html += '</table>';
$('#scheduleList').html(html);
}
</script>
</div>
</div>
</div>
<input type="hidden" id="res-venue-fsid" name="data[Appointment][fs_id]">
<input type="hidden" id="organizer" name="data[Appointment][organizer]">
<br/>
<div class="action-btn-holder action-btn-holder__warning">
<input type="button" value="Create Appointment!" class="action-btn qtip" onclick="showDoneView()" title="Create an appointment and start inviting your friends!"/>
<!-- Decoration -->
<span class="stars stars__small"></span>
<span class="action-btn-back"></span>
<!-- Decoration / End -->
</div>
<!-- Action Button / End -->
</div>
<div class="grid_4 hide-mobile">
<div class="collapse">
<div class="recommendedbox" style="display: block; width: 250px; height: 500px;">
<div class="arrow-left" style="left: -10px;"></div>
<div class="arrow-left-border" style="left: -10px;"></div>
<div style="font-family: 'Jockey One',sans-serif; padding: 0px 0 0;" class="form-msg">Venue Recommendations</div>
<br/>
<div id="rec_menu-loading" style='text-align:center;'>
<img src='//d3ptx09acki40b.cloudfront.net/images/ajax-loader.gif'/>
</div>
<div style="max-height: 450px; overflow: auto;">
<ul id='rec_menu'>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
</form> <!-- Primary Content / End -->
</div>
<!-- Content / End -->
<script>
function doLogin() {
$('#signInBtn').hide();
$('#signInBox').show();
}
function login() {
var email = $('#memberEmail').val();
var password = $('#memberPassword').val();
if (email == '' || password == '') {
alert('Please enter your email and password');
return;
}
$.ajax({
dataType: 'text',
cache: false,
url: '/members/login.json',
type: 'POST',
data: {'data[Member][email]': email, 'data[Member][password]': password},
success: function(res) {
var resJson = jQuery.parseJSON(res);
if (resJson.status === 'success') {
$('#resform').submit();
}
},
error: function(XMLHttpRequest, textStatus, errorThrown) {
console.log("failed : " + textStatus + ' ' + errorThrown);
}
});
}
var localCache = new Array();
$(function() {
var options = ['Food', 'Drinks', 'Coffee', 'Trending', 'Top Picks', 'Arts', 'Outdoors'];
var categories = new Array();
categories['Food'] = 'food';
categories['Drinks'] = 'drinks';
categories['Coffee'] = 'coffee';
categories['Trending'] = 'trending';
categories['Top Picks'] = 'topPicks';
categories['Arts'] = 'arts';
categories['Outdoors'] = 'outdoors';
if ($('#venuesuggestion').length) {
$('#venuesuggestion').autocomplete({
minLength: 0,
messages: {
noResults: '',
results: function() {
}
},
source: function(request, response) {
var search = $('#venuesuggestion').val();
if (search.length == 0){
//check for mobile size resolution
var width = $(window).width();
if (width >= 960){
response(options);
return;
}
}
//foursquare
var today = new Date();
var month = today.getMonth();
month++;
if (month < 10) {
month = "0" + month;
}
var day = today.getDate();
if (day < 10) {
day = "0" + day;
}
var d1 = "" + today.getFullYear() + month + day;
var result = new Array();
var url = '';
//first item is user-defined
if (search.length > 0){
result.push({'label': 'Add <b>' + search + '</b>', 'value': null, 'address': null, 'fs_id': null, 'lat': 0, 'lng': 0});
response(result);
}
locationArea = $('#venuelocation').val();
if (search && search !== '') {
if (latlng === '') {
url = 'https://api.foursquare.com/v2/venues/search?near=' + locationArea + '&query=' + search + '&client_id=JNKH2FLIUGD2ZBKPILFDOZPOHFYPNYKJVLL1PD3FNNYDQB4I&client_secret=R13QXXPTXHDRCYTK3JLQOK2IEOYNNN22P1QMIYZIH4QU3YJZ&v=' + d1;
}
else {
url = 'https://api.foursquare.com/v2/venues/search?ll=' + latlng + '&query=' + search + '&client_id=JNKH2FLIUGD2ZBKPILFDOZPOHFYPNYKJVLL1PD3FNNYDQB4I&client_secret=R13QXXPTXHDRCYTK3JLQOK2IEOYNNN22P1QMIYZIH4QU3YJZ&v=' + d1;
}
$.ajax({
url: url,
dataType: 'jsonp',
success: function(data) {
var venues = data.response.venues;
for (i = 0; i < venues.length; i++) {
if (!venues[i].location.address){
venues[i].location.address = '';
}
result.push({'label': venues[i].name, 'value': venues[i].name, 'address': venues[i].location.address, 'fs_id': venues[i].id, 'lat': venues[i].location.lat, 'lng': venues[i].location.lng, 'url': venues[i].url});
}
response(result);
},
error: function(data) {
console.log('error' + data);
}
});
}
},
search: function() {
//$("#search-loading").show();
$('#AppointmentVenueName').val('');
$(this).removeClass("ui-corner-all").addClass("ui-corner-top");
},
open: function() {
//$("#search-loading").hide();
$(this).removeClass("ui-corner-all").addClass("ui-corner-top");
$('#extender').show();
},
close: function() {
$(this).removeClass("ui-corner-top").addClass("ui-corner-all");
$('#extender').hide();
},
select: function(event, ui) {
var name = ui.item.value;
if (name){
name = name.replace(/\'/g, "`");
}
var address = ui.item.address;
var fs_id = ui.item.fs_id;
var search = $('#venuesuggestion').val();
if (search.length > 0){
addVenueSuggestion(name, address, fs_id, ui.item.url);
}
else{
$('#venuesuggestion').blur();
createFoursquareURLWithNear(categories[ui.item.label]);
}
$('#venuesuggestion').val('');
return false;
}
})
.focus(function() {
$(this).autocomplete('search');
})
.data("ui-autocomplete")._renderItem = function(ul, item) {
if (item.label){
var vid = item.fs_id;
var src = "//d3ptx09acki40b.cloudfront.net/images/empty_box.gif";
if (vid != null) {
var date = moment().format("YYYYMMDD");
if (localCache[vid] == null) {
$.getJSON('https://api.foursquare.com/v2/venues/' + vid + '?client_id=JNKH2FLIUGD2ZBKPILFDOZPOHFYPNYKJVLL1PD3FNNYDQB4I&client_secret=R13QXXPTXHDRCYTK3JLQOK2IEOYNNN22P1QMIYZIH4QU3YJZ&v=' + date,
function(data1) {
if (data1.meta.code == '200') {
if (data1.response.venue.photos.groups[0]) {
var photos = data1.response.venue.photos.groups[0].items;
for (var j = 0; j < photos.length; j++) {
var curr = photos[j];
if (curr != null) {
$("#img_" + vid).attr('src', curr.prefix + "50x50" + curr.suffix);
localCache[vid] = curr.prefix + "50x50" + curr.suffix;
break;
}
}
}
}
}
);
}
else {
src = localCache[vid];
}
return $("<li style='padding-top: 10px; padding-bottom: 5px;'>")
.append("<a><table><tr><td rowspan=2><img class='hide-mobile' style='width:50px;height:50px;border-radius:9px;' id='img_" + item.fs_id + "' src='" + src + "'/></td><td style='max-width: 250px'>" + item.label + "</td></tr><tr><td style='max-width: 250px'>" + item.address + "</td></tr></table></a>")
.appendTo(ul);
}
else {
return $("<li style='padding-top: 10px; padding-bottom: 5px;'>")
.append("<a><table><tr><td></td><td>" + item.label + "</td></tr></table></a>")
.appendTo(ul);
}
}
else{
return $("<li style='padding-top: 10px; padding-bottom: 5px;'>")
.append("<a>" + item + "</a>")
.appendTo(ul);
}
};
}
});
venueSuggestions = [];
function addVenueSuggestion(name, address, fs_id, url) {
if (name === null) {
name = $("#venuesuggestion").val();
if (name === null || name === '') {
return;
}
}
$("#venuesuggestion").val('');
var found = false;
for (var i = 0; i < venueSuggestions.length; i++) {
if (venueSuggestions[i].name === name && venueSuggestions[i].address === address && venueSuggestions[i].fs_id === fs_id) {
found = true;
break;
}
}
if (!found) {
venueSuggestions.push({'name': name, 'address': address, 'fs_id': fs_id, 'url': url});
console.log("size : " + venueSuggestions.length);
}
refreshVenueSuggestions();
$('#venueSuggestionElem').val(JSON.stringify(venueSuggestions));
}
function removeVenueSuggestion(index) {
venueSuggestions.splice(index, 1);
//console.log("size : " + venueSuggestions.length);
refreshVenueSuggestions();
$('#venueSuggestionElem').val(JSON.stringify(venueSuggestions));
}
function refreshVenueSuggestions() {
var html = '<table>';
for (var i = 0; i < venueSuggestions.length; i++) {
var pic = '<img class="hide-mobile" style="width:50px;height:50px;border-radius:9px;" src="//d3ptx09acki40b.cloudfront.net/images/empty_box.gif" />';
var vid = venueSuggestions[i].fs_id;
console.log('vid ' + vid);
if (vid) {
if (localCache[vid]) {
pic = "<img class='hide-mobile' src ='" + localCache[vid] + "' style='width:50px;height:50px;border-radius:9px;'/>";
}
else {
pic = "<img class='hide-mobile' src='//d3ptx09acki40b.cloudfront.net/images/empty_box.gif' id='img_" + vid + "' style='width:50px;height:50px;border-radius:9px;'/>";
var date = getCurrentDate();
var url = 'https://api.foursquare.com/v2/venues/' + vid + '/photos';
var param = 'group=venue';
param += '&client_id=JNKH2FLIUGD2ZBKPILFDOZPOHFYPNYKJVLL1PD3FNNYDQB4I&client_secret=R13QXXPTXHDRCYTK3JLQOK2IEOYNNN22P1QMIYZIH4QU3YJZ&v=';
param += date;
$.getJSON(url, param, function(photoData) {
if (photoData.meta.code === 200) {
var photos = photoData.response.photos.items;
for (var j = 0; j < photos.length; j++) {
var curr = photos[j];
if (curr !== null) {
//console.log(curr.prefix + "35x35" + curr.suffix);
localCache[vid] = curr.prefix + "50x50" + curr.suffix;
$("#img_" + vid).attr('src', curr.prefix + "50x50" + curr.suffix);
break;
}
}
}
});
}
}
var address = '';
if (venueSuggestions[i].address) {
if (venueSuggestions[i].address) {
address = venueSuggestions[i].address;
}
}
console.log(venueSuggestions[i]);
if (venueSuggestions[i].url){
html += "<tr><td style='vertical-align: middle; padding: 6px;'>" + pic + "</td><td style='vertical-align: middle; padding: 6px; width: 300px;'><a href='" + venueSuggestions[i].url + "' target=_blank>" + venueSuggestions[i].name + "</a><br/>" + address + "</td><td style='vertical-align: middle; padding: 6px;'> (<a href='javascript:void(0)' onclick='removeVenueSuggestion(" + i + ")'>remove</a>)</td></tr>";
}
else{
html += "<tr><td style='vertical-align: middle; padding: 6px;'>" + pic + "</td><td style='vertical-align: middle; padding: 6px; width: 300px;'>" + venueSuggestions[i].name + "<br/>" + address + "</td><td style='vertical-align: middle; padding: 6px;'> (<a href='javascript:void(0)' onclick='removeVenueSuggestion(" + i + ")'>remove</a>)</td></tr>";
}
}
html += '</table>';
$('#venueList').html(html);
}
</script>
<script>
function showDoneView() {
if (scheduleSuggestions.length === 0 || venueSuggestions.length === 0) {
alert("Please add a venue suggestion and a schedule suggestion");
return;
}
//$('#firstView').hide();
//$('#doneView').show();
//$('#detailsView').hide();
//$('#booking-table-modal').show();
$('#booking-table-modal').reveal({
animation: 'fadeAndPop',
animationspeed: 300,
closeonbackgroundclick: true,
dismissmodalclass: 'close-reveal-modal'
});
}
function doSearch(){
$('#venuesuggestion').autocomplete('search');
}
$(document).ready(function(){
//$('.back-to-top').hide();
fixFBVisibility();
createFoursquareURLWithNear();
});
</script>
<!-- Appointment Modal
================================================================ -->
<div id="booking-table-modal" class="reveal-modal">
<div class="reveal-modal-inner" style="padding: 10px 10px; text-align: center;">
<div class="field clearfix">
<div class="form-msg">Organizer</div>
<div style="padding-top: 10px; float: left;" id="organizerView1">
<input class="input-small" type="text" id="organizer2" value="" placeholder="Name" style="width: 200px;"/>
</div>
<div style="padding-top: 10px; padding-left: 15px; padding-right: 15px; float: left;" id="organizerView2">
Or
</div>
<div style="padding-top: 10px; float: left; text-align: left;" id="organizerView3">
<div id="signInBox" style="display: none;">
<input class="input-small" type="text" id="memberEmail" value="" placeholder="Email" style="width: 200px;"/>
<input class="input-small" type="password" id="memberPassword" value="" placeholder="Password" style="width: 200px;"/>
<input type="button" onclick="login()" value="Sign in now" class="action-btn" style="border-radius: 10px; padding: 5px; font-size: 11pt;"/>
</div>
<input id="signInBtn" type="button" onclick="doLogin()" value="Sign in" class="action-btn" style="border-radius: 10px; padding: 5px; font-size: 11pt;"/>
<br/><br/>
</div>
<div style="display: none; text-align: center;" id="organizerView4">
</div>
</div>
<div class="action-btn-holder action-btn-holder__warning">
<input type="button" name="res-submit" id="res-submit" value="Done" class="action-btn" onclick="submitAppointment()"/>
<!-- Decoration -->
<span class="stars stars__small"></span>
<span class="action-btn-back"></span>
<!-- Decoration / End -->
</div>
<!-- Action Button / End -->
</div>
<a class="close-reveal-modal">×</a>
</div>
<!-- Booking Table Modal / End -->
',
'scripts_for_layout' => ''
)
$title_for_layout = 'Makan Kaki'
$content_for_layout = '<pre class="cake-error"><a href="javascript:void(0);" onclick="document.getElementById('cakeErr593cb37220d27-trace').style.display = (document.getElementById('cakeErr593cb37220d27-trace').style.display == 'none' ? '' : 'none');"><b>Notice</b> (8)</a>: Undefined index: HTTP_ACCEPT_ENCODING [<b>APP/View/Pages/main.ctp</b>, line <b>4</b>]<div id="cakeErr593cb37220d27-trace" class="cake-stack-trace" style="display: none;"><a href="javascript:void(0);" onclick="document.getElementById('cakeErr593cb37220d27-code').style.display = (document.getElementById('cakeErr593cb37220d27-code').style.display == 'none' ? '' : 'none')">Code</a> <a href="javascript:void(0);" onclick="document.getElementById('cakeErr593cb37220d27-context').style.display = (document.getElementById('cakeErr593cb37220d27-context').style.display == 'none' ? '' : 'none')">Context</a><pre id="cakeErr593cb37220d27-code" class="cake-code-dump" style="display: none;"><code><span style="color: #000000">$CDN = "//d3ptx09acki40b.cloudfront.net";</span></code>
<code><span style="color: #000000"></span></code>
<span class="code-highlight"><code><span style="color: #000000">if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')){</span></code></span></pre><pre id="cakeErr593cb37220d27-context" class="cake-context" style="display: none;">$viewFile = '/var/www/makankaki.com/public_html/app/View/Pages/main.ctp'
$dataForView = array(
'title_for_layout' => 'Makan Kaki'
)
$title_for_layout = 'Makan Kaki'
$CDN = '//d3ptx09acki40b.cloudfront.net'</pre><pre class="stack-trace">include - APP/View/Pages/main.ctp, line 4
View::_evaluate() - CORE/Cake/View/View.php, line 923
View::_render() - CORE/Cake/View/View.php, line 886
View::render() - CORE/Cake/View/View.php, line 476
Controller::render() - CORE/Cake/Controller/Controller.php, line 956
Dispatcher::_invoke() - CORE/Cake/Routing/Dispatcher.php, line 193
Dispatcher::dispatch() - CORE/Cake/Routing/Dispatcher.php, line 161
[main] - APP/webroot/index.php, line 93</pre></div></pre>
<!-- Welcome Section
================================================================ -->
<link rel="stylesheet" type="text/css" href="//d3ptx09acki40b.cloudfront.net/tn3/skins/tn3e/tn3eb.css" />
<script type="text/javascript" src="//d3ptx09acki40b.cloudfront.net/tn3/js/jquery.tn3b.min.js"></script>
<script type="text/javascript" src="//d3ptx09acki40b.cloudfront.net/js/venuemgmt/venue_recommended_main.js"></script>
<!-- Content
================================================================ -->
<div style="position: relative; top: -90px; height: 450px; padding-bottom: 0; margin-bottom: 0; text-align: center; padding-top: 50px;" class="banners-wrap hide-mobile">
<div id="tagline">The easiest way to organize gathering with your friends</div>
<br/><br/>
<div style="float: left; margin-left: 150px;">
<iframe width="650" scrolling="no" height="366" frameborder="0" src="//www.youtube.com/embed/qEWsiufD6Kc?rel=0" frameborder="0" allowfullscreen></iframe>
</div>
<div>
<div id="google_play_store">
<a href="https://play.google.com/store/apps/details?id=com.makankaki.makankaki" target="play_store"><img src="/img/playstore.png" alt="Play Store" width="452" height="160" /></a>
</div>
<div id="apple_app_store" style="margin-top: 50px;">
<a href="https://itunes.apple.com/app/id670547626" target="itunes_store"><img src="/img/itunes-download.png" alt="iTunes" width="453" height="156" /></a>
</div>
</div>
</div>
<div id="content-wrapper" class="content-wrapper" style="padding-bottom: 30px;">
<!-- Primary Content -->
<form action="/appointments/add" id="resform" class="form form__modal" method="post" accept-charset="utf-8"><div style="display:none;"><input type="hidden" name="_method" value="POST"/></div> <div class="container">
<div class="clearfix">
<div class="grid_1"> </div>
<div class="grid_7" style="text-align: center;">
<div id="detailsView">
<div class="box">
<div style="position: absolute; top: -10px; left: -10px;"><img src="//d3ptx09acki40b.cloudfront.net/images/step1_80.png" /></div>
<div class="form-msg" style="font-family: 'Jockey One',sans-serif; padding: 0px 0 0;">Suggest some venues</div>
<div><i>Search and add some venue suggestions</i></div>
<div class="field clearfix" style="padding-top: 20px;">
<div id="venueList" style="margin: 5px 5px; max-height: 200px; overflow-y: auto; text-align: left;">
<div style=" width: 221px; height: 120px; background-image: url('//d3ptx09acki40b.cloudfront.net/images/dummy_venue2.png'); background-repeat: no-repeat; opacity: 0.4; filter:alpha(opacity=40); cursor: pointer;" onclick="zoomVenue();">
</div>
</div>
<input type="hidden" id="venueSuggestionElem" name="data[Appointment][venuesuggestion]" value="[]" />
<div style="padding-top: 10px;">
<div id="searchbox-main">
<input class="input-small" type="text" id="venuesuggestion" value="" placeholder="Search a venue. E.g. starbucks"/>
</div>
<div id="countrysearch-main">
<input class="input-small" type="text" id="venuelocation" value="" placeholder="Preferred Location"/>
</div>
<div class="hide-mobile" style="margin-left: 10px; float: left; position: relative;">
<a href="javascript: doSearch();">
<img src="//d3ptx09acki40b.cloudfront.net/images/search_icon.png">
</a>
</div>
<div id="extender" style="height: 300px; display: none;">
</div>
</div>
</div>
</div>
<div class="spacer"></div>
<div class="clearfix box">
<div style="position: absolute; top: -10px; left: -10px;"><img src="//d3ptx09acki40b.cloudfront.net/images/step2_80.png" /></div>
<div class="form-msg" style="font-family: 'Jockey One',sans-serif; padding: 0px 0 0;">Suggest some dates</div>
<div><i>Select some possible dates</i></div>
<div id="scheduleList" style="margin: 5px 5px; max-height: 300px; overflow-y: auto; text-align: left;">
<div style="width: 90px; height: 90px; background-image: url('//d3ptx09acki40b.cloudfront.net/images/dummy_schedule.png'); background-repeat: no-repeat; opacity: 0.4; filter:alpha(opacity=40); cursor: pointer; padding-bottom: 10px;" onclick="zoomSchedule();">
</div>
</div>
<div>
<input class="input-small" type="text" id="scheduledatetime" name="data[Schedule][schedule_date]" value="" placeholder="Choose a date/time" />
<input type="hidden" id="scheduleSuggestionElem" name="data[Appointment][schedulesuggestion]" value="[]" />
<script>
$(document).ready(function() {
$('#scheduledatetime').datetimepicker({
format: 'Y-m-d H:i',
step: 5,
minDate: 0,
onSelectTime: addScheduleSuggestion,
inline: true
});
});
function zoomSchedule(){
$('#scheduledatetime').focus();
}
function zoomVenue(){
$('#venuesuggestion').focus();
}
scheduleSuggestions = [];
function addScheduleSuggestion() {
var d1 = $("#scheduledatetime").val();
if (d1 !== '') {
var found = false;
for (var i = 0; i < scheduleSuggestions.length; i++) {
if (scheduleSuggestions[i] === d1) {
found = true;
break;
}
}
if (!found) {
scheduleSuggestions.push(d1);
//console.log("size : " + scheduleSuggestions.length);
}
$("#scheduledatetime").val('');
$("#scheduledatetime").attr('placeholder', 'Suggest more date/time');
refreshScheduleSuggestions();
$('#scheduleSuggestionElem').val(JSON.stringify(scheduleSuggestions));
}
}
function removeScheduleSuggestion(index) {
scheduleSuggestions.splice(index, 1);
console.log("size : " + scheduleSuggestions.length);
refreshScheduleSuggestions();
$('#scheduleSuggestionElem').val(JSON.stringify(scheduleSuggestions));
}
function refreshScheduleSuggestions() {
var html = '<table>';
for (var i = 0; i < scheduleSuggestions.length; i++) {
var d1 = moment(scheduleSuggestions[i]);
//d1 = d1.format("MMMM Do YYYY, hh:mm a");
html += '<div style="width: 90px;float: left; height: 110px;"><div class="scheduleBox"><div style="position: relative; font-size: 10pt; top: 10px; color: white; width: 80px; text-align: center;text-shadow: none;">' + d1.format("MMM") + '</div><div style="position: relative; text-align: center; color: black; top: 20px; width: 80px; text-shadow: none; font-weight: bolder; font-size: 16pt;">' + d1.format('D') + '</div><div style="position: relative; text-align: center; color: black; top: 20px; width: 80px; text-shadow: none; font-size: 10pt;">' + d1.format('h:mm A') + '</div></div><div style="width: 90%; float: left; text-align: center;">(<a href="javascript:void(0)" onclick="removeScheduleSuggestion(' + i + ')">remove</a>)</div></div>';
}
html += '</table>';
$('#scheduleList').html(html);
}
</script>
</div>
</div>
</div>
<input type="hidden" id="res-venue-fsid" name="data[Appointment][fs_id]">
<input type="hidden" id="organizer" name="data[Appointment][organizer]">
<br/>
<div class="action-btn-holder action-btn-holder__warning">
<input type="button" value="Create Appointment!" class="action-btn qtip" onclick="showDoneView()" title="Create an appointment and start inviting your friends!"/>
<!-- Decoration -->
<span class="stars stars__small"></span>
<span class="action-btn-back"></span>
<!-- Decoration / End -->
</div>
<!-- Action Button / End -->
</div>
<div class="grid_4 hide-mobile">
<div class="collapse">
<div class="recommendedbox" style="display: block; width: 250px; height: 500px;">
<div class="arrow-left" style="left: -10px;"></div>
<div class="arrow-left-border" style="left: -10px;"></div>
<div style="font-family: 'Jockey One',sans-serif; padding: 0px 0 0;" class="form-msg">Venue Recommendations</div>
<br/>
<div id="rec_menu-loading" style='text-align:center;'>
<img src='//d3ptx09acki40b.cloudfront.net/images/ajax-loader.gif'/>
</div>
<div style="max-height: 450px; overflow: auto;">
<ul id='rec_menu'>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
</form> <!-- Primary Content / End -->
</div>
<!-- Content / End -->
<script>
function doLogin() {
$('#signInBtn').hide();
$('#signInBox').show();
}
function login() {
var email = $('#memberEmail').val();
var password = $('#memberPassword').val();
if (email == '' || password == '') {
alert('Please enter your email and password');
return;
}
$.ajax({
dataType: 'text',
cache: false,
url: '/members/login.json',
type: 'POST',
data: {'data[Member][email]': email, 'data[Member][password]': password},
success: function(res) {
var resJson = jQuery.parseJSON(res);
if (resJson.status === 'success') {
$('#resform').submit();
}
},
error: function(XMLHttpRequest, textStatus, errorThrown) {
console.log("failed : " + textStatus + ' ' + errorThrown);
}
});
}
var localCache = new Array();
$(function() {
var options = ['Food', 'Drinks', 'Coffee', 'Trending', 'Top Picks', 'Arts', 'Outdoors'];
var categories = new Array();
categories['Food'] = 'food';
categories['Drinks'] = 'drinks';
categories['Coffee'] = 'coffee';
categories['Trending'] = 'trending';
categories['Top Picks'] = 'topPicks';
categories['Arts'] = 'arts';
categories['Outdoors'] = 'outdoors';
if ($('#venuesuggestion').length) {
$('#venuesuggestion').autocomplete({
minLength: 0,
messages: {
noResults: '',
results: function() {
}
},
source: function(request, response) {
var search = $('#venuesuggestion').val();
if (search.length == 0){
//check for mobile size resolution
var width = $(window).width();
if (width >= 960){
response(options);
return;
}
}
//foursquare
var today = new Date();
var month = today.getMonth();
month++;
if (month < 10) {
month = "0" + month;
}
var day = today.getDate();
if (day < 10) {
day = "0" + day;
}
var d1 = "" + today.getFullYear() + month + day;
var result = new Array();
var url = '';
//first item is user-defined
if (search.length > 0){
result.push({'label': 'Add <b>' + search + '</b>', 'value': null, 'address': null, 'fs_id': null, 'lat': 0, 'lng': 0});
response(result);
}
locationArea = $('#venuelocation').val();
if (search && search !== '') {
if (latlng === '') {
url = 'https://api.foursquare.com/v2/venues/search?near=' + locationArea + '&query=' + search + '&client_id=JNKH2FLIUGD2ZBKPILFDOZPOHFYPNYKJVLL1PD3FNNYDQB4I&client_secret=R13QXXPTXHDRCYTK3JLQOK2IEOYNNN22P1QMIYZIH4QU3YJZ&v=' + d1;
}
else {
url = 'https://api.foursquare.com/v2/venues/search?ll=' + latlng + '&query=' + search + '&client_id=JNKH2FLIUGD2ZBKPILFDOZPOHFYPNYKJVLL1PD3FNNYDQB4I&client_secret=R13QXXPTXHDRCYTK3JLQOK2IEOYNNN22P1QMIYZIH4QU3YJZ&v=' + d1;
}
$.ajax({
url: url,
dataType: 'jsonp',
success: function(data) {
var venues = data.response.venues;
for (i = 0; i < venues.length; i++) {
if (!venues[i].location.address){
venues[i].location.address = '';
}
result.push({'label': venues[i].name, 'value': venues[i].name, 'address': venues[i].location.address, 'fs_id': venues[i].id, 'lat': venues[i].location.lat, 'lng': venues[i].location.lng, 'url': venues[i].url});
}
response(result);
},
error: function(data) {
console.log('error' + data);
}
});
}
},
search: function() {
//$("#search-loading").show();
$('#AppointmentVenueName').val('');
$(this).removeClass("ui-corner-all").addClass("ui-corner-top");
},
open: function() {
//$("#search-loading").hide();
$(this).removeClass("ui-corner-all").addClass("ui-corner-top");
$('#extender').show();
},
close: function() {
$(this).removeClass("ui-corner-top").addClass("ui-corner-all");
$('#extender').hide();
},
select: function(event, ui) {
var name = ui.item.value;
if (name){
name = name.replace(/\'/g, "`");
}
var address = ui.item.address;
var fs_id = ui.item.fs_id;
var search = $('#venuesuggestion').val();
if (search.length > 0){
addVenueSuggestion(name, address, fs_id, ui.item.url);
}
else{
$('#venuesuggestion').blur();
createFoursquareURLWithNear(categories[ui.item.label]);
}
$('#venuesuggestion').val('');
return false;
}
})
.focus(function() {
$(this).autocomplete('search');
})
.data("ui-autocomplete")._renderItem = function(ul, item) {
if (item.label){
var vid = item.fs_id;
var src = "//d3ptx09acki40b.cloudfront.net/images/empty_box.gif";
if (vid != null) {
var date = moment().format("YYYYMMDD");
if (localCache[vid] == null) {
$.getJSON('https://api.foursquare.com/v2/venues/' + vid + '?client_id=JNKH2FLIUGD2ZBKPILFDOZPOHFYPNYKJVLL1PD3FNNYDQB4I&client_secret=R13QXXPTXHDRCYTK3JLQOK2IEOYNNN22P1QMIYZIH4QU3YJZ&v=' + date,
function(data1) {
if (data1.meta.code == '200') {
if (data1.response.venue.photos.groups[0]) {
var photos = data1.response.venue.photos.groups[0].items;
for (var j = 0; j < photos.length; j++) {
var curr = photos[j];
if (curr != null) {
$("#img_" + vid).attr('src', curr.prefix + "50x50" + curr.suffix);
localCache[vid] = curr.prefix + "50x50" + curr.suffix;
break;
}
}
}
}
}
);
}
else {
src = localCache[vid];
}
return $("<li style='padding-top: 10px; padding-bottom: 5px;'>")
.append("<a><table><tr><td rowspan=2><img class='hide-mobile' style='width:50px;height:50px;border-radius:9px;' id='img_" + item.fs_id + "' src='" + src + "'/></td><td style='max-width: 250px'>" + item.label + "</td></tr><tr><td style='max-width: 250px'>" + item.address + "</td></tr></table></a>")
.appendTo(ul);
}
else {
return $("<li style='padding-top: 10px; padding-bottom: 5px;'>")
.append("<a><table><tr><td></td><td>" + item.label + "</td></tr></table></a>")
.appendTo(ul);
}
}
else{
return $("<li style='padding-top: 10px; padding-bottom: 5px;'>")
.append("<a>" + item + "</a>")
.appendTo(ul);
}
};
}
});
venueSuggestions = [];
function addVenueSuggestion(name, address, fs_id, url) {
if (name === null) {
name = $("#venuesuggestion").val();
if (name === null || name === '') {
return;
}
}
$("#venuesuggestion").val('');
var found = false;
for (var i = 0; i < venueSuggestions.length; i++) {
if (venueSuggestions[i].name === name && venueSuggestions[i].address === address && venueSuggestions[i].fs_id === fs_id) {
found = true;
break;
}
}
if (!found) {
venueSuggestions.push({'name': name, 'address': address, 'fs_id': fs_id, 'url': url});
console.log("size : " + venueSuggestions.length);
}
refreshVenueSuggestions();
$('#venueSuggestionElem').val(JSON.stringify(venueSuggestions));
}
function removeVenueSuggestion(index) {
venueSuggestions.splice(index, 1);
//console.log("size : " + venueSuggestions.length);
refreshVenueSuggestions();
$('#venueSuggestionElem').val(JSON.stringify(venueSuggestions));
}
function refreshVenueSuggestions() {
var html = '<table>';
for (var i = 0; i < venueSuggestions.length; i++) {
var pic = '<img class="hide-mobile" style="width:50px;height:50px;border-radius:9px;" src="//d3ptx09acki40b.cloudfront.net/images/empty_box.gif" />';
var vid = venueSuggestions[i].fs_id;
console.log('vid ' + vid);
if (vid) {
if (localCache[vid]) {
pic = "<img class='hide-mobile' src ='" + localCache[vid] + "' style='width:50px;height:50px;border-radius:9px;'/>";
}
else {
pic = "<img class='hide-mobile' src='//d3ptx09acki40b.cloudfront.net/images/empty_box.gif' id='img_" + vid + "' style='width:50px;height:50px;border-radius:9px;'/>";
var date = getCurrentDate();
var url = 'https://api.foursquare.com/v2/venues/' + vid + '/photos';
var param = 'group=venue';
param += '&client_id=JNKH2FLIUGD2ZBKPILFDOZPOHFYPNYKJVLL1PD3FNNYDQB4I&client_secret=R13QXXPTXHDRCYTK3JLQOK2IEOYNNN22P1QMIYZIH4QU3YJZ&v=';
param += date;
$.getJSON(url, param, function(photoData) {
if (photoData.meta.code === 200) {
var photos = photoData.response.photos.items;
for (var j = 0; j < photos.length; j++) {
var curr = photos[j];
if (curr !== null) {
//console.log(curr.prefix + "35x35" + curr.suffix);
localCache[vid] = curr.prefix + "50x50" + curr.suffix;
$("#img_" + vid).attr('src', curr.prefix + "50x50" + curr.suffix);
break;
}
}
}
});
}
}
var address = '';
if (venueSuggestions[i].address) {
if (venueSuggestions[i].address) {
address = venueSuggestions[i].address;
}
}
console.log(venueSuggestions[i]);
if (venueSuggestions[i].url){
html += "<tr><td style='vertical-align: middle; padding: 6px;'>" + pic + "</td><td style='vertical-align: middle; padding: 6px; width: 300px;'><a href='" + venueSuggestions[i].url + "' target=_blank>" + venueSuggestions[i].name + "</a><br/>" + address + "</td><td style='vertical-align: middle; padding: 6px;'> (<a href='javascript:void(0)' onclick='removeVenueSuggestion(" + i + ")'>remove</a>)</td></tr>";
}
else{
html += "<tr><td style='vertical-align: middle; padding: 6px;'>" + pic + "</td><td style='vertical-align: middle; padding: 6px; width: 300px;'>" + venueSuggestions[i].name + "<br/>" + address + "</td><td style='vertical-align: middle; padding: 6px;'> (<a href='javascript:void(0)' onclick='removeVenueSuggestion(" + i + ")'>remove</a>)</td></tr>";
}
}
html += '</table>';
$('#venueList').html(html);
}
</script>
<script>
function showDoneView() {
if (scheduleSuggestions.length === 0 || venueSuggestions.length === 0) {
alert("Please add a venue suggestion and a schedule suggestion");
return;
}
//$('#firstView').hide();
//$('#doneView').show();
//$('#detailsView').hide();
//$('#booking-table-modal').show();
$('#booking-table-modal').reveal({
animation: 'fadeAndPop',
animationspeed: 300,
closeonbackgroundclick: true,
dismissmodalclass: 'close-reveal-modal'
});
}
function doSearch(){
$('#venuesuggestion').autocomplete('search');
}
$(document).ready(function(){
//$('.back-to-top').hide();
fixFBVisibility();
createFoursquareURLWithNear();
});
</script>
<!-- Appointment Modal
================================================================ -->
<div id="booking-table-modal" class="reveal-modal">
<div class="reveal-modal-inner" style="padding: 10px 10px; text-align: center;">
<div class="field clearfix">
<div class="form-msg">Organizer</div>
<div style="padding-top: 10px; float: left;" id="organizerView1">
<input class="input-small" type="text" id="organizer2" value="" placeholder="Name" style="width: 200px;"/>
</div>
<div style="padding-top: 10px; padding-left: 15px; padding-right: 15px; float: left;" id="organizerView2">
Or
</div>
<div style="padding-top: 10px; float: left; text-align: left;" id="organizerView3">
<div id="signInBox" style="display: none;">
<input class="input-small" type="text" id="memberEmail" value="" placeholder="Email" style="width: 200px;"/>
<input class="input-small" type="password" id="memberPassword" value="" placeholder="Password" style="width: 200px;"/>
<input type="button" onclick="login()" value="Sign in now" class="action-btn" style="border-radius: 10px; padding: 5px; font-size: 11pt;"/>
</div>
<input id="signInBtn" type="button" onclick="doLogin()" value="Sign in" class="action-btn" style="border-radius: 10px; padding: 5px; font-size: 11pt;"/>
<br/><br/>
</div>
<div style="display: none; text-align: center;" id="organizerView4">
</div>
</div>
<div class="action-btn-holder action-btn-holder__warning">
<input type="button" name="res-submit" id="res-submit" value="Done" class="action-btn" onclick="submitAppointment()"/>
<!-- Decoration -->
<span class="stars stars__small"></span>
<span class="action-btn-back"></span>
<!-- Decoration / End -->
</div>
<!-- Action Button / End -->
</div>
<a class="close-reveal-modal">×</a>
</div>
<!-- Booking Table Modal / End -->
'
$scripts_for_layout = ''
$CDN = '//d3ptx09acki40b.cloudfront.net' include - APP/View/Layouts/default.ctp, line 7
View::_evaluate() - CORE/Cake/View/View.php, line 923
View::_render() - CORE/Cake/View/View.php, line 886
View::renderLayout() - CORE/Cake/View/View.php, line 540
View::render() - CORE/Cake/View/View.php, line 484
Controller::render() - CORE/Cake/Controller/Controller.php, line 956
Dispatcher::_invoke() - CORE/Cake/Routing/Dispatcher.php, line 193
Dispatcher::dispatch() - CORE/Cake/Routing/Dispatcher.php, line 161
[main] - APP/webroot/index.php, line 93
Makan Kaki
Notice (8) : Undefined index: HTTP_ACCEPT_ENCODING [APP/View/Pages/main.ctp , line 4 ]Code Context $CDN = "//d3ptx09acki40b.cloudfront.net";
if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')){ $viewFile = '/var/www/makankaki.com/public_html/app/View/Pages/main.ctp'
$dataForView = array(
'title_for_layout' => 'Makan Kaki'
)
$title_for_layout = 'Makan Kaki'
$CDN = '//d3ptx09acki40b.cloudfront.net' include - APP/View/Pages/main.ctp, line 4
View::_evaluate() - CORE/Cake/View/View.php, line 923
View::_render() - CORE/Cake/View/View.php, line 886
View::render() - CORE/Cake/View/View.php, line 476
Controller::render() - CORE/Cake/Controller/Controller.php, line 956
Dispatcher::_invoke() - CORE/Cake/Routing/Dispatcher.php, line 193
Dispatcher::dispatch() - CORE/Cake/Routing/Dispatcher.php, line 161
[main] - APP/webroot/index.php, line 93
The easiest way to organize gathering with your friends