/    Sign up×
Community /Pin to ProfileBookmark

Microsoft VBScript runtime error ‘800a01a8’

I have a site that we recently had some SSL update issues and now the site is returning errors, not sure if it is related. When I click on the ‘BUY TIX’ logo on any of the shows on our web schedule (https://www.nbotickets.com) I get the following runtime error…

Microsoft VBScript runtime error ‘800a01a8’
Object required: ‘Session(…).TicketingModule.Get_Event_Data_Result’
/includes/hall_1.asp, line 59

Here is the code with line 59 highlighted:

<%
” ————————————————————-
” eSRO Basket Site
” Version 3.2.3
” Sep 06, 2005
” Powered by: TopTix LTD.
” ————————————————————-
” hall_1.asp – the main screen part for the seating plan page.
” ————————————————————-

Response.Expires = -1500
Response.ExpiresAbsolute = Now() – 1

” added from hall.asp
ExecuteInclude(scIncBef)
if Get_Form_Value(“event”) = “” or Get_Form_Value(“event”) = “0” then
EventCode = GetSessionVar(“CurrentEvent_EventCode”)
else
EventCode = Get_Form_Value(“event”)
end if

‘response.write “EVENT CODE:” & EventCode
‘response.end

” check if to cancel the tickets
if Get_Form_Value(“cancel”) = 1 then
if Session(“objESRO2”).Basket.Free_Basket( Session(“UID”),”Tickets;” & Get_Tickets_Unique_IDs(EventCode,Get_Form_Value(“area”)) ) <> “” then
SetSessionVar “Error_CurrentError” , Session(“objESRO2”).Common.Logs.strLastErrorString
Dispose_Esro_Session_Object()
Response.Redirect “errors.asp”
Response.End
end if
end if

” check if it is the same event so we will not need
” to call Get_Event_Data again
if cstr(EventCode) <> cstr(GetSessionVar(“CurrentEvent_EventCode”)) then
”Auto switch ga area event code
Session(“ev_skiped_areas”) = “”
if Session(“objESRO2”).TicketingModule.Get_Event_Data(Session(“UID”),EventCode) <> “” then
SetSessionVar “Error_CurrentError” , Session(“objESRO2”).Common.Logs.strLastErrorString
Dispose_Esro_Session_Object()
Response.Redirect “errors.asp”
Response.End
end if
” check if we need to Force BA/GA (hlExtraText or specific interfaces)
set rs = Session(“objESRO2”).Common.Cn.Execute(“SELECT hlExtraText FROM Halls WHERE hlCode = ” & Session(“objESRO2”).TicketingModule.Loaded_Event.HallCode )
SetSessionVar “CurrentEvent_ForceBA” , “0”
if InStr(1,rs(“hlExtraText”),”Force BA=1″) > 0 then
SetSessionVar “CurrentEvent_ForceBA” , “1”
end if
rs.close
set rs = nothing
else
Session(“objESRO2”).TicketingModule.Set_Event_Data_Result_From_XML “”
end if

if Get_Form_Value(“area”) = “” then
**(Line 59)** SetSessionVar “CurrentEvent_AreaCode” , Session(“objESRO2”).TicketingModule.Get_Event_Data_Result.DefaultAreaCode
else
SetSessionVar “CurrentEvent_AreaCode” , Get_Form_Value(“area”)
end if

” Redirect to skip the venue map for Summer State of Mind – 7.21.2012
if GetSessionVar(“CurrentEvent_EventCode”) = 8345 then
Response.Redirect “auto_choose_ba.asp?area=” & GetSessionVar(“CurrentEvent_AreaCode”) & “&event=” & EventCode
Dispose_Esro_Session_Object()
Response.End
end if

if ( Trim(Session(“objESRO2”).TicketingModule.Loaded_Event.HallPicture) <> “” ) and ( Trim(Session(“objESRO2”).TicketingModule.Loaded_Event.HallAreasMap) <> “” ) and ( Get_Form_Value(“open_map”) <> “no” ) then
Dispose_Esro_Session_Object()
Response.Redirect “venue_areas.asp”
Response.End
end if

if Session(“objESRO2”).TicketingModule.Get_Event_Data_Result.Areas(“_” & GetSessionVar(“CurrentEvent_AreaCode”)).AreaType = “GA” then
Session(“objESRO2”).Session.Add_Record_To_CallerSession Session(“UID”),”Navigate”,”internet”,”opening page ‘hall.asp’ ( event = ” & GetSessionVar(“CurrentEvent_EventCode”) & ” , area_type = GA )”
my_area_code = GetSessionVar(“CurrentEvent_AreaCode”)
Dispose_Esro_Session_Object()
Response.Redirect “auto_choose_ga.asp?area=” & my_area_code & “&event=” & EventCode
Response.End
end if

if Session(“objESRO2”).TicketingModule.Get_Event_Data_Result.Areas(“_” & GetSessionVar(“CurrentEvent_AreaCode”)).AreaType = “BA” OR GetSessionVar(“CurrentEvent_ForceBA”) = “1” then
Session(“objESRO2”).Session.Add_Record_To_CallerSession Session(“UID”),”Navigate”,”internet”,”opening page ‘hall.asp’ ( event = ” & GetSessionVar(“CurrentEvent_EventCode”) & ” , area_type = BA )”
my_area_code = GetSessionVar(“CurrentEvent_AreaCode”)
Dispose_Esro_Session_Object()
Response.Redirect “auto_choose_ba.asp?area=” & my_area_code & “&event=” & EventCode
Response.End
end if

Session(“objESRO2”).Session.Add_Record_To_CallerSession Session(“UID”),”Navigate”,”internet”,”opening page ‘hall.asp’ ( event = ” & GetSessionVar(“CurrentEvent_EventCode”) & ” , hall = ” & Session(“objESRO2″).TicketingModule.Loaded_Event.HallCode & ” , area = ” & GetSessionVar(“CurrentEvent_AreaCode”) & ” )”
Session(“LocationBarString”) = GetString(2,”string”,”home page”) & ” ” & GetString(3,”string”,”Tickets”) & ” ” & Session(“objESRO2”).TicketingModule.Loaded_Event.ShowName

”load_screen_parts “hall.asp”,0
ExecuteInclude(scIncAft)
” end added from hall.asp

” Added for the my_settings drop
StagePosition = Get_Global_Param(“My Settings”, “Stage Position”)

” get the area levels string
dim arrAreas , strAreaLevels
arrAreas = split(Session(“objESRO2”).TicketingModule.Get_Event_Data_Result.Get_Attribute(“AreasList”),”|–|”)

for i=0 to ubound(arrAreas)
arrTMP = split(arrAreas(i),”||”)
if CLng(arrTMP(0)) = CLng( GetSessionVar(“CurrentEvent_AreaCode”) ) then
strAreaLevels = “,” & arrTMP(3) & “,”
if ucase(trim(arrTMP(7))) <> “NONE” then
StagePosition = ucase(trim(arrTMP(7)))
end if
exit for
end if
next

” build the commissions , discounts and pricing strings
dim arrCommissions , arrDiscounts , arrPriceTypes , arrPricing
arrPriceTypes = Split(Session(“objESRO2”).TicketingModule.Get_Event_Data_Result.Get_Attribute(“Pricing”),”|–|”)

redim arrCommissions(UBound(arrPriceTypes))
redim arrDiscounts(UBound(arrPriceTypes))
redim arrPricing(UBound(arrPriceTypes))

for i=0 to UBound(arrPriceTypes)
arrPriceType = Split(arrPriceTypes(i),”||”)

arrCommissions(i) = arrPriceType(0) & “;”
arrDiscounts(i) = arrPriceType(0) & “;”
arrPricing(i) = arrPriceType(0) & “;”

arrTMP = split(arrPriceType(1),”=”,2)
arrCommissions(i) = arrCommissions(i) & arrTMP(1)
arrTMP = split(arrPriceType(2),”=”,2)
arrDiscounts(i) = arrDiscounts(i) & arrTMP(1)

arrTMP = split(arrPriceType(3),”;”)
BaseCHR = 97

for j = 0 to UBound(arrTMP)
if j mod 4 = 0 then
‘Removed “trim” by Dima, 30/08/2005 (because strAreaLevels has the price level untrimmed, compare can fail)
‘if InStr(1, strAreaLevels , “,” & trim(arrTMP(j)) & “,” ) > 0 then
if InStr(1, strAreaLevels , “,” & arrTMP(j) & “,” ) > 0 then
arrPricing(i) = arrPricing(i) & Chr(BaseCHR) & “;”
BaseCHR = BaseCHR + 1
else
arrPricing(i) = arrPricing(i) & “z;”
end if
end if

arrPricing(i) = arrPricing(i) & arrTMP(j)
if j <> UBound(arrTMP) then arrPricing(i) = arrPricing(i) & “;”

next

next

%>
<SCRIPT LANGUAGE=javascript>
<!–
//var legal_selection;
var i , j ;
var max_tickets_number = 0 , current_tickets_number = 0 ; // the maximum tickets allowed per event
var levels , strTemp , arrTemp ; // for the prices array
var arrTickets = new Array() ;
var arrPrices = new Array() ;
var arrCommissions = new Array() ;
var arrDiscounts = new Array() ;
var selectedArea;

<% for i=0 to UBound(arrPriceTypes)
‘ replaced “get_js_string” with escape/unescape 30/08/2005, dima
%>
arrPrices[<% = i %>] = unescape(‘<% = escape( Replace(arrPricing(i),”,”,”.”) ) %>’);
arrCommissions[<% = i %>] = unescape(‘<% = escape( arrCommissions(i) ) %>’);
arrDiscounts[<% = i %>] = unescape(‘<% = escape( arrDiscounts(i) ) %>’);
<% next %>

var arrAreas = new Array() , strAreas = new String() ;
<%’replaced “get_js_string” with escape/unescape , Dima 30/08/2005%>
strAreas = unescape(‘<% = escape( Session(“objESRO2”).TicketingModule.Get_Event_Data_Result.Get_Attribute(“AreasList”) ) %>’);
arrAreas = strAreas.split(‘|–|’);

max_tickets_number = <% = Session(“objESRO2”).TicketingModule.Loaded_Event.EventMaxTickets %>;
current_tickets_number = <% = get_tickets_number(GetSessionVar(“CurrentEvent_EventCode”)) %>

function get_price(levelindex,arrpricetype) {
var i = levelindex ;
var price , strPrice ;
//price = parseFloat(arrpricetype[i+2]) + parseFloat(arrpricetype[i+3]) – parseFloat(arrpricetype[i+4]) ;
price = parseFloat(arrpricetype[i+2]) ;
price=round(price);
if ( parseFloat(arrpricetype[i+2]) <= 0 ) {
return ‘-1’;
}
if ( parseFloat(price) <= 0 ) {
return ‘-1’;
}
strPrice = price.toString(10);
return my_format_currency(strPrice);
}

function get_commission(pricetype) {
var arrTemp , strTemp , i , j ;
for (i=0;i<arrCommissions.length;i++) {
strTemp = arrCommissions[i];
arrTemp = strTemp.split(‘;’);
if (pricetype == arrTemp[0]) {
if ( arrTemp[2] == 0 ) {
return 0 ;
} else {
return parseFloat(arrTemp[5]);
}
}
}
return 0;
}

function get_discount(pricetype) {
var arrTemp , strTemp , i , j ;
for (i=0;i<arrDiscounts.length;i++) {
strTemp = arrDiscounts[i];
arrTemp = strTemp.split(‘;’);
if (pricetype == arrTemp[0]) {
if ( arrTemp[2] == 0 ) {
return 0 ;
} else {
return parseFloat(arrTemp[5]);
}
}
}
return 0;
}

function update_commission_discount() {
var i,arrTMP=new Array();
for (i=0; i<arrCommissions.length ; i++) {

// update commission
arrTMP = arrCommissions[i].split(‘;’);
if ( arrTMP[0] == parseInt(window.document.getElementById(‘cmbPriceType’).value,10) ) {
if (parseInt(arrTMP[2],10)==0) {
window.document.getElementById(‘lblCommission’).innerHTML = ” ;
window.document.getElementById(‘lblCommission’).style.display = ‘none’;
} else {
window.document.getElementById(‘lblCommission’).innerHTML = ‘Commission : ‘ + arrTMP[3] + ‘ ( ‘ + arrTMP[4] + ‘ )’;
window.document.getElementById(‘lblCommission’).style.display = ”;
}
}

// update discount
arrTMP = arrDiscounts[i].split(‘;’);
if ( arrTMP[0] == parseInt(window.document.getElementById(‘cmbPriceType’).value,10) ) {
if (parseInt(arrTMP[2],10)==0) {
window.document.getElementById(‘lblDiscount’).innerHTML = ” ;
window.document.getElementById(‘lblDiscount’).style.display = ‘none’;
} else {
window.document.getElementById(‘lblDiscount’).innerHTML = ‘Discount : ‘ + arrTMP[3] + ‘ ( ‘ + arrTMP[4] + ‘ )’;
window.document.getElementById(‘lblDiscount’).style.display = ”;
}
}

}

}

function change_area() {
// find if the selected area is a BA GA or Signed
for (i=0; i<arrAreas.length ;i++) {

strTemp = arrAreas[i] ;
arrTemp = strTemp.split(‘||’) ;
if ( parseInt(arrTemp[0],10) == parseInt(window.document.getElementById(‘cmbArea’).value,10) ) {
<% if Get_Global_Param(“eSRO Site”, “Disable Sold Out Areas”) = 1 then %>
if (arrTemp[5] == 0) {
alert(‘<% = get_js_string( GetString(313,”string”,”No Available Seats in this area.”) ) %>’);
window.document.getElementById(‘cmbArea’).selectedIndex = selectedArea;
return;
}
<% end if %>

if ( arrTemp[2] == ‘Signed’ ) {
open_url(‘hall.asp?open_map=no&event=’ + window.document.getElementById(‘txtEventCode’).value + ‘&area=’ + window.document.getElementById(‘cmbArea’).value );
} else {
if ( arrTemp[2] == ‘GA’ ) {
open_url(‘auto_choose_ga.asp?open_map=no&event=’ + window.document.getElementById(‘txtEventCode’).value + ‘&area=’ + window.document.getElementById(‘cmbArea’).value );
} else {
open_url(‘auto_choose_ba.asp?open_map=no&event=’ + window.document.getElementById(‘txtEventCode’).value + ‘&area=’ + window.document.getElementById(‘cmbArea’).value );
}
}
}
}

}

function change_prices() {
// change the prices by the selected price type
for (i=0 ; i<arrPrices.length ; i++ ) {
strTemp = arrPrices[i] ;
arrTemp = strTemp.split(“;”);
if ( parseInt(arrTemp[0],10) == window.document.getElementById(‘cmbPriceType’).value ) {
levels = ( arrTemp.length – 2 ) / 5
for ( j=0 ; j<levels ; j++ ) {
if ( get_price(2+(j*5),arrTemp) == ‘-1’ ) {
eval(“window.document.getElementById(‘price_” + arrTemp[2 + ((j*
5) + 0) ] + “‘).innerHTML='<% = GetString(56,”string”,”N/A”) %>’;”);
eval(“window.document.getElementById(‘price_
” + arrTemp[2 + ((j*5) + 0) ] + “‘).title=’Not available for this discount’;”);
eval(“window.document.getElementById(‘img_” + arrTemp[2 + ((j*
5) + 0) ] + “‘).title=’Not available for this discount’;”);
} else {
eval(“window.document.getElementById(‘price_
” + arrTemp[2 + ((j*5) + 0) ] + “‘).innerHTML='<% = Get_Global_Param(“My Settings”, “Currency Sign”) %>” + get_price(2+(j*5),arrTemp) + “‘;”);
eval(“window.document.getElementById(‘price_” + arrTemp[2 + ((j*5) + 0) ] + “‘).title=”;”);
eval(“window.document.getElementById(‘img
_
” + arrTemp[2 + ((j*5) + 0) ] + “‘).title=”;”);
}
}
}
}
update_commission_discount()
}

function show_tickets() {
for (i=0; i<arrTickets.length; i++) {
if ( arrTickets[i][0] == 1 ) {
alert( arrTickets[i][0].toString() + ‘ – ‘ + arrTickets[i][1].toString() + ‘ – ‘ + arrTickets[i][2].toString() + ‘ – ‘ + arrTickets[i][3].toString() + ‘ – ‘ + arrTickets[i][4].toString() + ‘ – ‘ + arrTickets[i][5].toString() + ‘ – ‘ + arrTickets[i][6].toString() + ‘ – ‘ + arrTickets[i][7].toString() + ‘ – ‘ + arrTickets[i][8].toString() + ‘ – ‘ + arrTickets[i][9].toString());
}
}
}

function check_tickets_limit() {
var max_transact_tickets , current_transact_tickets ;
// check if it is more than the tickets allowed for a transaction
max_transact_tickets = <% = clng(Get_Global_Param(“My Settings”, “Max Tickets (transaction)”)) %> ;
current_transact_tickets = <% = Session(“objESRO2”).Basket.Tickets.Count – get_tickets_number(GetSessionVar(“CurrentEvent_EventCode”)) %> ;

if ( current_transact_tickets + current_tickets_number > max_transact_tickets – 1 ) {
alert(‘<% = get_js_string( GetString(272,”string”,”You cannot order more than”) ) %> ‘ + max_transact_tickets.toString() + ‘ <% = get_js_string( GetString(345,”string”,”tickets in a transaction”) ) %>’);
return false ;
}

//check if it is more than the tickets allowed for this event
if ( current_tickets_number < max_tickets_number ) {
return true ;
} else {
alert(‘<% = get_js_string( GetString(272,”string”,”You cannot order more than”) ) %> ‘ + max_tickets_number.toString() + ‘ <% = get_js_string( GetString(273,”string”,”tickets to this event.”) ) %>’);
return false ;
}

}

function add_ticket(row,col,level) {
var place , index , arrLevel ;
row += 1 ;
col += 1 ;

// update the max tickets
current_tickets_number += 1 ;

place = get_ticket_index(row,col) ;
arrTickets[place][0] = 1 ; // chair status
arrTickets[place][1] = row ; // row
arrTickets[place][2] = col ; // col
arrTickets[place][3] = window.document.getElementById(‘cmbPriceType’).value ; // price type

// get price level , commission and discount
for (i=0 ; i<arrPrices.length ; i++ ) {
strTemp = arrPrices[i] ;
arrTemp = strTemp.split(“;”);
if ( parseInt(arrTemp[0],10) == window.document.getElementById(‘cmbPriceType’).value ) {
index = i ;
levels = ( arrTemp.length – 2 ) / 5
for ( j=0 ; j<levels ; j++ ) {
if ( arrTemp[2 + ((j*5) + 0) ] == level ) {
// get the level from [leve lcode – level name]
arrLevel = arrTemp[2 + ((j*5) + 1) ].split(‘-‘);
arrTickets[place][4] = arrLevel[0] ; // arrTemp[2 + ((j*5) + 1) ] // price level
arrTickets[place][5] = arrTemp[2 + ((j*5) + 2) ] // price
arrTickets[place][7] = arrTemp[2 + ((j*5) + 3) ] // commission value
arrTickets[place][9] = arrTemp[2 + ((j*5) + 4) ] // discount value
}
}
}
}

strTemp = arrCommissions[index] ;
arrTemp = strTemp.split(“;”);
arrTickets[place][6] = arrTemp[2] // commission code
strTemp = arrDiscounts[index] ;
arrTemp = strTemp.split(“;”);
arrTickets[place][8] = arrTemp[2] // discount code

}

function get_ticket_index(row,col) {
if ( arrTickets.length == 0 ) {
arrTickets[0] = new Array() ;
return 0 ;
} else {
for (i=0; i<arrTickets.length; i++) {
if (arrTickets[i][0] == 0) {
// found one free index
return i ;
}
}
// build new record
arrTickets[i] = new Array() ;
return i ;
}
}

function remove_ticket(row , col) {
// update the max tickets
current_tickets_number -= 1 ;

row += 1 ;
col += 1 ;
for (i=0; i<arrTickets.length; i++) {
if ( ( arrTickets[i][0] == 1 ) && ( arrTickets[i][1] == row ) && ( arrTickets[i][2] == col ) ) {
arrTickets[i][0] = 0 ;
}
}

}

function update_summary_label() {
var Sum1 , Count1 ;
Sum1 = 0;
Count1 = 0;
for (i=0; i<arrTickets.length; i++) {
if ( arrTickets[i][0] == 1 ) {
Count1 += 1;
Sum1 += parseFloat(arrTickets[i][5]) + parseFloat(arrTickets[i][7]) – parseFloat(arrTickets[i][9]) ;
}
}

if ( Count1 > 0 ) {
var strPrice ;
strPrice = round(Sum1).toString(10);
window.document.getElementById(‘lblSummary’).innerHTML = Count1 + ‘ ‘ + ‘<% = get_js_string( GetString(3,”string”,”Tickets”) ) %>’ + ‘, ‘ + ‘<% = GetString(63,”string”,”Total”) %>’ + ‘ = ‘ + ‘<% = Get_Global_Param(“My Settings”, “Currency Sign”) %>’ + my_format_currency(strPrice) ;
} else {
window.document.getElementById(‘lblSummary’).innerHTML = ” ;
}

}

var seatingPlanIsLoaded=false;
//–>
</SCRIPT>

<INPUT type=”hidden” id=txtEventCode name=txtEventCode value=”<% = GetSessionVar(“CurrentEvent_EventCode”) %>” >
<INPUT type=”hidden” id=txtTickets name=txtTickets value=”” >

<ul>
<li class=”general_caption” style=”height:auto;”>
<div >
&nbsp;<% = GetString(47,”string”,”Area Seating Plan”) %>
</div>
</li>

<li>
<div>
<SPAN class=”small_text_b”> <B><% = GetString(39,”string”,”Event”) %>&nbsp;:&nbsp;</B><% = Session(“objESRO2″).TicketingModule.Loaded_Event.ShowName %>&nbsp;&nbsp;<B><% = GetString(40,”string”,”On”) %></B>&nbsp;&nbsp;<% = Session(“objESRO2”).Common.MyFormat.Format_Date(DateAdd(“h”, -Get_Global_Param(“My Settings”, “Hours To Add”), Session(“objESRO2”).TicketingModule.Loaded_Event.EventDateTime ))& “&nbsp;” & Session(“objESRO2”).TicketingModule.Loaded_Event.EventTimeString %>&nbsp;&nbsp;&nbsp; </SPAN>
</div>
</li>
<li>
<div>
<SPAN class=”small_text_b”> <B><% = GetString(30,”string”,”Location”) %></B>&nbsp;&nbsp;<% = Session(“objESRO2″).TicketingModule.Loaded_Event.HallName %>&nbsp;&nbsp;&nbsp; <B><% = GetString(41,”string”,”Area”) %>&nbsp;:&nbsp;</B> </SPAN>
<SELECT class=”small_text_b” onchange=”javascript:return change_area();” id=cmbArea name=cmbArea>
<SCRIPT LANGUAGE=javascript>
<!–
// update the area
var str;
for ( i = 0; i < arrAreas.length; i++) {
strTemp = arrAreas[i];
arrTemp = strTemp.split(“||”);
str = ”;
if (parseInt(arrTemp[0], 10) == parseInt(‘<% = GetSessionVar(“CurrentEvent_AreaCode”) %>’, 10)) {
str = ‘selected’;
selectedArea = i;
}
document.write(“<OPTION ” + str + ” value='” + arrTemp[0] + “‘>” + arrTemp[1] + “</OPTION>”);
}
//–>
</SCRIPT>
</SELECT>
<% if ( Trim(Session(“objESRO2”).TicketingModule.Loaded_Event.HallPicture) <> “” ) and ( Trim(Session(“objESRO2”).TicketingModule.Loaded_Event.HallAreasMap) <> “” ) then %>
<% if UBound(arrAreas) > 0 then %>
&nbsp;
<INPUT class=”small_button_a” type=”button” value=”<% = GetString(57,”string”,”Seating Plan”) %>” title=”<% = GetString(57,”title”,”Back to Seating Plan”) %>” onmouseover=”javascript: this.className=’small_button_a_hover’;” onmouseout=”javascript: this.className=’small_button_a’;” onclick=”javascript:window.location.href=(‘venue_areas.asp’);” id=button1 name=button1>
<% end if %>
<% end if %>
</div>
</li>
<li>
<div>
<span class=”small_text_b”> <B>Quick Help&nbsp;:</B> Choose the type of seating above, then select desired seats on the seating plan. </span>
</div>
</li>

<li style=”display:none;” >
<div>
<SPAN class=”small_text_b”><B><% = GetString(58,”string”,”Ticket Type”) %>&nbsp;:&nbsp;</B></SPAN>
<SELECT class=”small_text_b” onchange=”javascript:return change_prices();” class=”MySmallLabel” id=cmbPriceType name=cmbPriceType>
<SCRIPT LANGUAGE=javascript>
<!–
// update the price type combo box
for ( i = 0; i < arrPrices.length; i++) {
strTemp = arrPrices[i];
arrTemp = strTemp.split(“;”);
document.write(“<OPTION value='” + arrTemp[0] + “‘>” + arrTemp[1] + “</OPTION>”);
}
//–>
</SCRIPT>
</SELECT>
<label name=lblCommission id=lblCommission style=’display:none;’>&nbsp;&nbsp;&nbsp;Commission :</label>
<label name=lblDiscount id=lblDiscount style=’display:none;’>&nbsp;&nbsp;&nbsp;Discount :</label>
</div>
</li>

<form name=”Radio”>
<li>
<div class=”small_text_b”>
<B><% = GetString(58,”string”,”Ticket Type”) %>&nbsp;:&nbsp;</B>
</div>
<div>

<SCRIPT LANGUAGE=javascript>
<!–
// update the price type combo box
var arrPTLoop = new Array();
incPT = 0
strTemp = ”;
for ( i = 0; i < arrPrices.length; i++) {
strTemp = arrPrices[i];
arrTemp = strTemp.split(“;”);
if (i == 0) {
//strTemp = ‘ CHECKED ‘ ;
strTemp = ”;
} else {
strTemp = ”;
}
document.write(“<div id=’divPriceType” + arrTemp[0] + “‘> <INPUT style=’padding-top:5px;’ class=’small_text_a’ id=’rsPriceType” + arrTemp[0] + “‘ name=’rsPriceType’ type=radio value='” + arrTemp[0] + “‘ onclick=’javascript:return change_radio(this.value);’ ” + strTemp + ” ><SPAN class=’small_text_b’>” + arrTemp[1] + “</SPAN></INPUT>&nbsp;&nbsp;&nbsp;</div>”);

arrPTLoop[incPT] = arrTemp[0];
incPT = incPT + 1
}
//–>
</SCRIPT>
</div>
</li>
</form>

<li>
<div>
<SPAN class=”small_text_b”><B><% = GetString(50,”string”,”Legend”) %>&nbsp;:&nbsp;</B></SPAN>
<IMG id=”imgLegendTaken” height=15 hspace=0 src=’Images/hall/1.gif’ width=11 alt=”<% = Server.HTMLEncode(GetString(54,”string”,”Taken”)) %>”>&nbsp;<SPAN class=”small_text_b”><% = GetString(54,”string”,”Taken”) %>&nbsp;</SPAN>
<IMG id=”imgLegendMySelection” height=15 hspace=0 src=’Images/hall/a1.gif’ width=11 alt=”<% = Server.HTMLEncode(GetString(55,”string”,”My Choice”)) %>”>&nbsp;<SPAN class=”small_text_b”><% = GetString(55,”string”,”My Choice”) %>&nbsp;&nbsp;&nbsp;</SPAN>
<SPAN class=”small_text_b reserved_prices”>
<SCRIPT LANGUAGE=javascript>
<!–
// build the price levels images
strTemp = arrPrices[0] ;
arrTemp = strTemp.split(“;”);
levels = ( arrTemp.length – 2 ) / 5
var place;
var strAltTaken=’T’,strAltMySelection=’My’,strAltPriceLevel=’L’;

document.getElementById(“imgLegendTaken”).alt=strAltTaken;
document.getElementById(“imgLegendMySelection”).alt=strAltMySelection;

for ( j=0 ; j<levels ; j++ ) {
place = arrTemp[2 + ((j*5) + 0) ] ;
if ( get_price(2+(j*5),arrTemp) == ‘-1’ ) {
document.write(“<IMG style=’display:none;’ title=’Not available for this discount’ name=’img_” + place + “‘ id=’img_” + place + “‘ alt='<% = Server.HTMLEncode(GetString(56,”string”,”N/A”)) %>’ height=15 hspace=0 src=’Images/hall/” + place + “.gif’ width=11 ><label style=’display:none;’ title=’Not available for this discount’ name=’price_” + place + “‘ id=’price_” + place + “‘>” + “<% = GetString(56,”string”,”N/A”) %>” + “</label><label style=’display:none;’ name=’space_” + place + “‘ id=’space_” + place + “‘>&nbsp;&nbsp;&nbsp;&nbsp</label>”);
} else {
document.write(“<IMG style=’display:none;’ name=’img_” + place + “‘ id=’img_” + place + “‘ height=15 alt='”+strAltPriceLevel+(j+1)+”‘ hspace=0 src=’Images/hall/” + place + “.gif’ width=11 ><label style=’display:none;’ name=’price_” + place + “‘ id=’price_” + place + “‘><% = Get_Global_Param(“My Settings”, “Currency Sign”) %>” + get_price(2+(j*5),arrTemp) + “</label><label style=’display:none;’ name=’space_” + place + “‘ id=’space_” + place + “‘>&nbsp;&nbsp;</label>”);
}
}
update_commission_discount()
//–>
</SCRIPT>
</SPAN>
</div >

</li>

<li>
<div>
&nbsp;<!–#INCLUDE file=”FeeMessage.asp”–>
</div>
</li>
<li>
<div class=”span12 item_data_background”>
<div class=”span12 hidden-phone hidden-table”>
<INPUT class=”small_button_b” type=”button” onmouseover=”javascript: this.className=’small_button_b_hover’;” onmouseout=”javascript: this.className=’small_button_b’;” value=”<% = GetString(51,”string”,”Refresh”) %>” title=”<% = GetString(51,”title”,”Refresh Area Plan”) %>” id=btnRefresh name=btnRefresh onclick=”refresh_seats();” >
&nbsp;
<INPUT class=”small_button_c” type=”button” onmouseover=”javascript: this.className=’small_button_c_hover’;” onmouseout=”javascript: this.className=’small_button_c’;” value=”<% = GetString(52,”string”,”Clear My Choice”) %>” title=”<% = GetString(52,”title”,”Clear seats selected by me”) %>” id=btnClear name=btnClear onclick=”cancel_seats();” >
&nbsp;
<INPUT class=”small_button_a” type=”button” onmouseover=”javascript: this.className=’small_button_a_hover’;” onmouseout=”javascript: this.className=’small_button_a’;” value=”<% = GetString(53,”string”,”Order Seats”) %>” title=”<% = GetString(53,”title”,”Order seats selected by me”) %>” id=btnOrder name=btnOrder onclick=”order_seats();” >
</div>
<INPUT class=”btn btn-success btn-block hidden-desktop” type=”button” value=”<% = GetString(53,”string”,”Order Seats”) %>” title=”<% = GetString(53,”title”,”Order seats selected by me”) %>” id=btnOrder name=btnOrder onclick=”order_seats();” >
</div>
</li>
<li>
<div class=”span12 item_data_background small_text_b” id=”lblSummary” name=”lblSummary”></div>
</li>
<li>

<div style=”width:100%;text-align:center;” id=”divStatus”>
<SPAN style=”width=100%” name=lblStatus id=lblStatus><% = GetString(64,”string”,”Loading Seating Plan”) %>&nbsp;.</SPAN>
</div>

</li>
<li class=”seating_plan” name=”seats” id=”seats” style=”border:0;height:100%;width:100%;position:relative;overflow:auto;”>
<%= Server.Execute(“seats_plan2.asp”)%>
</li>

</ul>
<script type=”text/javascript”>

<!–
// fill the existing tickets
i =0 ;
<%
” check if exists tickets for the same area and event
if Session(“objESRO2”).Basket.Tickets.Count > 0 then
for i=1 to Session(“objESRO2”).Basket.Tickets.Count
if ( clng(Session(“objESRO2”).Basket.Tickets(i).eSRO_EventCode) = clng(GetSessionVar(“CurrentEvent_EventCode”)) ) and ( clng(Session(“objESRO2”).Basket.Tickets(i).AreaCode) = clng( GetSessionVar(“CurrentEvent_AreaCode”) ) ) then
%>
arrTickets[i] = new Array();
arrTickets[i][0] = 1;
arrTickets[i][1] = <%= Session(“objESRO2”).Basket.Tickets(i).Row %> ;
arrTickets[i][2] = <%= Session(“objESRO2”).Basket.Tickets(i).Col %> ;
arrTickets[i][3] = <%= Session(“objESRO2”).Basket.Tickets(i).PriceTypeCode %> ;
arrTickets[i][4] = <%= Session(“objESRO2”).Basket.Tickets(i).PriceLevel %> ;
arrTickets[i][5] = <%= Replace(Session(“objESRO2″).Basket.Tickets(i).Price,”,”,”.”) %> ;
arrTickets[i][6] = <%= Session(“objESRO2”).Basket.Tickets(i).CommissionCode %> ;
arrTickets[i][7] = <%= Replace(Session(“objESRO2″).Basket.Tickets(i).CommissionValue,”,”,”.”) %> ;
arrTickets[i][8] = <%= Session(“objESRO2”).Basket.Tickets(i).DiscountCode %> ;
arrTickets[i][9] = <%= Replace(Session(“objESRO2″).Basket.Tickets(i).DiscountValue,”,”,”.”) %> ;
i += 1;
<%
end if
next
end if
%>
i = 0;

function cancel_seats() {
open_url(‘hall.asp?open_map=no&cancel=1&event=’ + window.document.getElementById(‘txtEventCode’).value + ‘&area=’ + window.document.getElementById(‘cmbArea’).value);
}

function refresh_seats() {
open_url(‘hall.asp?open_map=no&event=’ + window.document.getElementById(‘txtEventCode’).value + ‘&area=’ + window.document.getElementById(‘cmbArea’).value);
}

function order_seats() {

// fill the tickets field
var strTMP;
strTMP = ”;
for ( i = 0; i < arrTickets.length; i++) {
if (arrTickets[i][0] == 1) {
if (strTMP != ”) {
strTMP = strTMP + ‘||’;
}

strTMP = strTMP + arrTickets[i][1] + ‘;’;
// row
strTMP = strTMP + arrTickets[i][2] + ‘;’;
// col
strTMP = strTMP + arrTickets[i][3] + ‘;’;
// price type
strTMP = strTMP + arrTickets[i][4] + ‘;’;
// price level
strTMP = strTMP + my_format_currency(parseFloatX(arrTickets[i][5])) + ‘;’;
// price
strTMP = strTMP + arrTickets[i][6] + ‘;’;
// commission code
strTMP = strTMP + my_format_currency(parseFloatX(arrTickets[i][7])) + ‘;’;
// commission value
strTMP = strTMP + arrTickets[i][8] + ‘;’;
// discount code
strTMP = strTMP + my_format_currency(parseFloatX(arrTickets[i][9]));
// discount value

if (parseFloatX(arrTickets[i][5]) <= 0) {
window.alert(‘Loading page again’);
window.location.reload(true);
return;
}

}
}
// check if no seats are selected
if (strTMP == ”) {
alert(‘<% = get_js_string( GetString(62,”string”,”select seats to order”) ) %>’);
return;
}

window.document.getElementById(‘txtTickets’).value = strTMP;
open_url(‘catch.asp?action_type=catch_tickets&tickets=’ + window.document.getElementById(‘txtTickets’).value + ‘&event=’ + window.document.getElementById(‘txtEventCode’).value + ‘&area=’ + window.document.getElementById(‘cmbArea’).value);
}

// function update_legal_selection(state) {
// // 0 = legal , 1 = not legal
// legal_selection = state;
// }

// update detailed summary label ( 2 Full = 10$ , 5 Child = 15$ : Total = 25$ )
function update_detailed_label() {
var tmpSUM, tmpCOUNT, mSUM, mCOUNT, i, j, strDetails, strPrice;

mSUM = 0;
mCOUNT = 0;
strDetails = ”;

for ( i = 0; i < window.document.getElementById(‘cmbPriceType’).options.length; i++) {
tmpSUM = 0;
tmpCOUNT = 0;
for ( j = 0; j < arrTickets.length; j++) {
if ((arrTickets[j][0] == 1 ) && (arrTickets[j][3] == window.document.getElementById(‘cmbPriceType’).options[i].value )) {
tmpCOUNT += 1;
mCOUNT += 1;
tmpSUM += parseFloat(arrTickets[j][5]) + parseFloat(arrTickets[j][7]) – parseFloat(arrTickets[j][9]);
mSUM += parseFloat(arrTickets[j][5]) + parseFloat(arrTickets[j][7]) – parseFloat(arrTickets[j][9]);
}
}
if (tmpCOUNT > 0) {
if (strDetails != ”)
strDetails = strDetails + ‘ , ‘;

// show only 2 digits
strPrice = tmpSUM.toString(10);
strDetails = strDetails + tmpCOUNT.toString(10) + ‘ ‘ + window.document.getElementById(‘cmbPriceType’).options[i].text + ‘ = ‘ + ‘<% = Get_Global_Param(“My Settings”, “Currency Sign”) %>’ + my_format_currency(strPrice);
}
}
if (mCOUNT > 0) {
// show only 2 digits
strPrice = mSUM.toString(10);
strDetails = strDetails + ‘ : <% = GetString(63,”string”,”Total”) %> = ‘ + ‘<% = Get_Global_Param(“My Settings”, “Currency Sign”) %>’ + my_format_currency(strPrice);
}

if (strDetails == ”)
strDetails = strEventDescription;

//window.document.getElementById(‘lblDetails’).innerHTML = strDetails ;

return;
}

function change_radio(price_type) {

for ( i = 0; i < window.document.getElementById(‘cmbPriceType’).options.length; i++) {
if (window.document.getElementById(‘cmbPriceType’).options[i].value == price_type) {
window.document.getElementById(‘cmbPriceType’).selectedIndex = i;
change_prices();
return 0;
}
}
}

function set_radio(price_type) {
for ( i = 0; i < window.document.getElementsByName(‘rsPriceType’).length; i++) {
if (window.document.getElementsByName(‘rsPriceType’)[i].value == price_type) {
window.document.getElementsByName(‘rsPriceType’)[i].checked = true;
change_radio(price_type);
break;
}
}
}

var strEventDescription;
strEventDescription = ‘ <% = Replace(Session(“objESRO2″).TicketingModule.Loaded_Event.EventDesc,”‘”,”‘”) %> ‘ ;

update_summary_label();
update_detailed_label();

// check if a price type was specified
//<% if Session(“temp_price_type”) <> “0” and Session(“temp_price_type”) <> “” then %>
// set_radio(‘<% = Session(“temp_price_type”) %>’);
//<% end if %>

// functions for showing
if (!seatingPlanIsLoaded) {
var Id_1 = window.setInterval(load_plan,300);
} else {
stop_load_plan();
}

function load_plan() {
var strTMP = new String();
strTMP = window.document.getElementById(‘lblStatus’).innerHTML ;
if ( parseInt(strTMP.length,10) <= 35 ) document.getElementById(‘lblStatus’).innerHTML = window.document.getElementById(‘lblStatus’).innerHTML + ‘.’ ;
}

function stop_load_plan()
{
window.clearInterval(Id_1);
document.getElementById(‘divStatus’).style.display=’none’;
//document.getElementById(‘flshLoading’).style.display=’none’;
}

// Hide the price types with no seats
strTemp = ” ;
for ( i=0 ; i<arrPrices.length ; i++) {

strTemp = arrPrices[i] ;
arrTemp = strTemp.split(“;”);

// NEW JH CODE hide unwanted price typs
levels = ( arrTemp.length – 2 ) / 5
pp = 0

for ( j=0 ; j<levels ; j++ ) {
place = arrTemp[2 + ((j*5) + 0) ] ;
if ( get_price(2+(j*5),arrTemp) == ‘-1’ ) {

} else {
//document.write(“<input type=text value='” + place + arrTemp[0] + “‘ >”)
if (place != ‘z’) {
pp = 1
x = arrTemp[0]
}
}
}

if (pp == 0) {
document.getElementById(‘divPriceType’ + arrTemp[0]).style.display = ‘none’
}

update_commission_discount()
// END OF NEW JH CODE

}

change_radio(x)
document.getElementById(‘rsPriceType’ + x).checked=true
update_commission_discount()

//–>

</SCRIPT>

to post a comment

0Be the first to comment 😎

×

Success!

Help @jprout65 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 4.26,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...