Created
October 25, 2012 17:37
-
-
Save stirlinghewitt/3954227 to your computer and use it in GitHub Desktop.
te geip
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{literal} | |
<script> | |
$(document).ready(function(){ | |
$('.changeloc').click(function() { | |
$('#geoloc').toggle(); | |
}); | |
}); | |
</script> | |
{/literal} | |
<div id="geoip-container"> {dynamic} | |
{atbs_geoip lookup=location location=geoip} | |
{atbs_geoip lookup=events max=25 location=geoip assign=events} | |
{if !empty($events)} | |
<div id="geoHdr" class="roundtop"> | |
<div class="blackshadow">Events Near: {$geoip->city}, {$geoip->region}</div> | |
<div style="position:absolute; top:7px; right:5px;"> | |
<div style="color:white; font-size:12px; font-weight:bold; text-decoration:underline; cursor:pointer;" class="changeloc">Set Location</div> | |
<div id="geoloc" style="background-color:#FFF; color:#000; padding:10px; border:3px solid #B21D13; display:none; z-index:999; width:300px; position:absolute; top:20px; right:0px"> <span style="font-size:16px; font-weight:bold">Change Location</span><br> | |
<form id="geoLocForm" method="post" action="/geoip/change_location_post" onsubmit="return submitGeo()"> | |
Enter zipcode or city, state: | |
<input id="geoLocInp" type="text" name="location" value="" /> | |
<input type="submit" value="Submit" /> | |
<div id="geoError"></div> | |
</form> | |
{literal} | |
<script> | |
function submitGeo() { | |
$.post("/geoip/change_location_post",{location: $("#geoLocInp").val()}, function(data) { | |
var result = eval(data); | |
if (result) { | |
window.location.reload(); | |
} else { | |
$("#geoError").html('Location not found. Please try again.'); | |
} | |
}); | |
return false; | |
} | |
</script> | |
{/literal} <br> | |
<a href="/CityGuides" style="text-decoration:underline;" title="All Cities">To see all cities check out our City Guide here</a> </div> | |
</div> | |
</div> | |
<table style="width:100%;" cellspacing="1" cellpadding="1" id="geoip"> | |
{foreach from=$events key=k item=i name=geo} | |
<tr class="{cycle values="geoodd,geoeven"}"> | |
<td class="geoEvent"><a href="/{$i->URL}">{$i->Event}</a></td> | |
<td class="geoDate">{$i->Date|atbsdate:"D M j <b\\r> g:iA"}</td> | |
<td class="geoVenue">{$i->Venue}</td> | |
<td class="geoMore"><div class="view-ticket-button rounded"> <a href="/{$i->URL}" class="view-ticket-button-text"><span class="lightwhiteshadow">View Tickets</span></a> </div></td> | |
</tr> | |
{/foreach} | |
</table> | |
{else} | |
{include file="geoip/change_location.tpl"} | |
{/if} | |
{/dynamic} | |
<div class="footer-bar"></div> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{dynamic name="side_cat_geoip" category=$category} | |
{atbs_geoip lookup=location location=geoip} | |
{atbs_geoip lookup=events max=30 location=geoip assign=geoip_events categories=$category.ParentCategoryID} | |
{if !empty($geoip_events)} | |
<div class="orgHdr">{if $category.ParentCategoryID == 1}Sporting {elseif $category.ParentCategoryID == 2}Concerts{else}Theatre {/if} near you</div> | |
<div class="topEventList"> | |
<ol> | |
{foreach from=$geoip_events item=i} | |
<li class="{cycle values="li_bg_o,li_bg_e"}"><a href="/{$i.URL}">{$i.Event} - {$i.Date|date_format:'%a, %b %e'}</a></li> | |
{/foreach} | |
</div> | |
{else} | |
<div class="orgHdr">Hot Events</div> | |
{atbs_hot_performers_in_category assign="relatedPerformers" category=$category} | |
<div class="topEventList"> | |
<ol> | |
{foreach from=$relatedPerformers key=k item=i} | |
<li class="{cycle values="li_bg_o,li_bg_e"}"><a href="/{$i.URL}">{$i.Performer}</a></li> | |
{/foreach} | |
</ol> | |
</div> | |
{/if} | |
{/dynamic} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment