Okay, so we have a section of our server portioned off to be a nested test site. However for whatever reason the below template causes an error in Joomla's php handler that it does not on the active site. What it posts when access is attempted on the test site is: Parse error: syntax error, unexpected 'var' (T_VAR) in /home/usaspo5/public_html/dev/usgnew/components/com_usg_progs/tmpls/default.php on line 4
<script id="template" type="text/html">
<%
var d = new Date();
d.setHours(0,0,0,0);
var setprorate = prorate;
var prorate = 0;
proDateTime = proDate+' '+proTime;
var cDateMySQL = new Date(Date.parse(proDateTime.replace('-','/','g')));
if ( d > cDateMySQL) {
prorate = 1;
}
var btnOnClick = "location.href='https://usasportgroup.com/component/usg_programs/index.php?option=com_usg_programs&view=program&pid="+pid+"&site="+'<?=$_REQUEST['site']?>'+"'";
var btnTxt = "More Info "+"|"+" Register".toUpperCase();
var spacesClass = "available";
var spacesTxt = "Available";
if(spaces >= 10)
{
spacesTxt = "Available";
spacesClass = "available";
}
else if(spaces == 0)
{
spacesTxt = "Sold Out";
spacesClass = "soldout";
btnTxt = "More Info "+"|"+" Wait List".fontcolor("darkslategrey");
}
else if(spaces <= 8 && spaces >= 1)
{
spacesTxt = "Spaces: "+spaces;
spacesClass = "limited";
}
if(pStatus == 3)
{
spacesTxt = "Tentative";
spacesClass = "tentative";
btnTxt = "More Info "+"|"+" Notify Me".fontcolor("darkslategrey");
}
if(cat == ''){
cat = "noimage";
}
if(typeof pAlert != 'undefined'){
var programAlert;
programAlert = pAlert.replace(/(\r\n|\n|\r)/gm,"");
}
if(product_refered =="Y"){
var price ="Call";
}
%>
<div class="panel panel-programs">
<div style="float:right">
<% if(programAlert){ %>
<button class="uk-button uk-button-danger" onclick="UIkit.modal.alert('<%=programAlert%>')">
<span class="uk-icon-info"></span></button>
<% } %>
<div class="badge badge-<%=spacesClass%>"><%=spacesTxt%></div>
<button onclick="<%=btnOnClick%>" class="uk-button uk-button-success register"><%=btnTxt%></button>
</div>
<div style="float:left;width:80px">
<img class="" src="components/com_usg_programs/assets/images/icons/<%=cat%>.png">
<div style="clear:left;width:80px;font-size:11px;margin-left:4px"><%=sku%></div>
</div>
<span style="color:#262F3A"><%=program%><br>Ages: <%=ageFrom%>-<%=ageTo%></span> | <%=session_type%>
<hr>
<div class="uk-container" style="padding:0">
<div class="uk-flex">
<div class="uk-width-medium-4-10">
<i class="uk-icon-map-marker"></i> <%=city%>, <%=state%> <%=zip%>
<br />
<i class="uk-icon-dot-circle-o"></i> Distance: <%=distance%> Miles
</div>
<div class="uk-width-medium-4-10">
<span class="uk-icon-calendar"></span> <%=startDate%> - <%=endDate%>
<br />
<span class="uk-icon-clock-o"></span> <%=startTime%> - <%=endTime%>
</div>
<div class="uk-width-medium-2-10" style="font-size:90%;text-align:right">
<span>
<% if(prorate == 1){ %>
<span>Program in session<br>Discounted fee</span>
<% } else { %>
<span>Fee: $<%=price%></span>
<% } %>
</span>
<% if((isGold == 0)||(product_refered=='Y')){ %>
<span data-uk-tooltip title="Not eligible <br />for Gold Club discount" class="uk-icon-star"></span>
<% } else { %>
<span data-uk-tooltip title="Gold Club members receive <br />10% discount on this <br />program" style="color:gold" class="uk-icon-star"></span>
<% } %>
<br />
<% if(isLatefee == 1){ %>
<span style="font-size:90%">After 15th May:</span> $<%=lateFee%>
<% } %>
</div>
</div>
</div>
</div>
</script>