<!--#include virtual="/includes/topofpage.asp"-->
<%
Dim Page 
Page = "26"

Dim Conn
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open Application("conn_string")

Dim Attraction_ID

If (UCase(Request.ServerVariables("REQUEST_METHOD")) = "POST" And Request.Form("page") = "0") Then

If Not Request.Form("Item_ID") = "" Then

	Item_ID = Request.Form("Item_ID")

	If Request.Form("Item_ID") = "" Then
		Item_ID = "0"
	End If

	Session("Admin_Group_ID") = Item_ID
		
	Else
	
		If Request.Form("Admin_Group_ID") <> "" Then
		Session("Admin_Group_ID") = Request.Form("Admin_Group_ID")
	End If
	
	If Session("Admin_Group_ID") = "" Then
		Session("Admin_Group_ID") = "0"
	End If

End If

End If

If (UCase(Request.ServerVariables("REQUEST_METHOD")) = "POST" And Request.Form("page") = Page) Then
Dim SQLAtt

'	@Inventory_List_ID int = NULL,
'	@Ticket_ID int,
'	@Description nvarchar(300),
'	@Cost nvarchar(50),
'	@Gate_Price nvarchar(50),
'	@Display_Price nvarchar(50),
'	@Do_Not_Display_Price bit,
'	@Realm int

SQLAtt = "[Avante].[dbo].[Update_Ticket_Price] "
SQLAtt = SQLAtt & "@Item_ID='" & Request("Item_ID") & "', "
SQLAtt = SQLAtt & "@Description='" & Request("Description") & "', "
SQLAtt = SQLAtt & "@Cost='" & Request("cost") & "', "
SQLAtt = SQLAtt & "@Gate_Price='" & Request("gate") & "', "
SQLAtt = SQLAtt & "@Display_Price='" & Request("display") & "',"
SQLAtt = SQLAtt & "@Do_Not_Display_Price='" & Request("Do_Not_Display_Price") & "', "
SQLAtt = SQLAtt & "@Realm='" & Session("Admin_Realm") & "', "
SQLAtt = SQLAtt & "@Pricing_URL='" & Request("Pricing_URL") & "'"
'Response.Write SQLAtt
Conn.Execute SQLAtt

If Request("Cont") = "1" Then 
Response.Redirect "default-attractions.asp"
Else
Response.Redirect "attraction-pricing.asp"
End If

End If

Dim SQLName, RSName
SQLName = "get_entity_from_group @Group_ID='" & Session("Admin_Group_ID") & "'"
Set RSName=Conn.Execute(SQLName)

%>
<html>
<STYLE>
BODY {SCROLLBAR-FACE-COLOR: #5e5ebe; SCROLLBAR-HIGHLIGHT-COLOR: #5e5ebe; SCROLLBAR-SHADOW-COLOR: #5e5ebe; SCROLLBAR-3DLIGHT-COLOR: #5e5ebe; SCROLLBAR-ARROW-COLOR:  #6666CC; SCROLLBAR-TRACK-COLOR: #E3E3E3; SCROLLBAR-DARKSHADOW-COLOR: #666666; }
</STYLE>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript">
<!--

function MM_showHideLayer_toggle() { //v3.0
  var i,p,v,obj,args=MM_showHideLayer_toggle.arguments;
  for (i=0; i<(args.length); i+=1) if ((obj=MM_findObj(args[i]))!=null) { 
    v = obj.style.visibility;
    if (obj.style) { 
		obj=obj.style; 
		v=(v=='hidden')?'visible':(v='visible')?'hidden':v; 
		}
    obj.visibility=v; }
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}

function Sub_Form(cont) {
if (!form1.Item_ID.value == '') {  
  form1.cont.value=cont
  form1.submit();
} else {
  alert ('Please select a ticket type.');
}
}
//-->
</script>
<link rel="stylesheet" href="/Style-sheets/manage-menu-bold.css" type="text/css">
<link rel="stylesheet" href="/Style-sheets/headline.css" type="text/css">
<link rel="stylesheet" href="/Style-sheets/galley-text-indent.css" type="text/css">
</head>

<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="MM_preloadImages('images/icon-return-to-main-2.gif','images/icon-submit-changes-2.gif','images/icon-continue-wizard-2.gif')">
<form name="form1" method="post" action="">
<input type="hidden" name="page" value="26">
<input type="hidden" name="cont" value="">
  <table width="525" border="0" cellspacing="0" cellpadding="2" align="center">
    <tr> 
      <td width="338">&nbsp;</td>
      <td align="right" width="187">&nbsp;</td>
    </tr>
    <tr> 
      <td width="338" bgcolor="#5e5ebe"class="headline-ffffff" 

align="center">Merchandise Pricing</td>

      <td bgcolor="#5e5ebe"align="right" width="187"><a href="default.asp" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image1','','images/icon-return-to-main-2.gif',1)"><img src="images/icon-return-to-main.gif" width="75" height="17" usemap="#returntomain" border="0" name="Image1"></a></td>
    </tr>
    <% If Not RSName.EOF Then %>
    <tr> 
      <td class="galley-text-indent" colspan="2"><%=RSName("Name")%> - <%=RSName("City")%>, 
        <%=RSName("State")%>&nbsp; <%=RSName("ZIP")%></td>
    </tr>
    <% Else %>
    <tr> 
      <td class="galley-text-indent-alert" colspan="2">No Entity Selected! Go 
        back and choose a location to edit from the dropdown menu.</td>
    </tr>
    <% End If %>
    <% RSName.Close %>
  </table>
  <table width="500" border="0" cellspacing="0" cellpadding="2" align="center">
    <tr> 
      <td width="148">&nbsp;</td>
      <td width="240">&nbsp;</td>
      <td width="100">&nbsp;</td>
    </tr>
    <tr> 
      <td width="148" class="manage-menu-bold">Ticket Name:</td>
      <td width="240" class="manage-menu"> 
        <%If Request.QueryString("Item_ID") = "" Then
        Set RSAttr = Server.CreateObject("ADODB.Recordset")
        RSAttr.Open "Select * From Inventory_Price_Merchandise Where Group_ID = '" & Session("Admin_Group_ID") & "'", Conn
        %>
        <%=Request.Form("Item_ID")%> 
        <select name="Item_ID">
          <option value="" selected>List of Available Merchandise</option>
          <option value="<%=RSAttr("Item_ID")%>"><%=RSAttr("Name")%></option>
        </select>
        <%
        RSAttr.Close()
        Else
        Set RSAttr = Server.CreateObject("ADODB.Recordset")
        RSAttr.Open "Select * From Inventory_List_Merchandise Where Item_ID = '" & Request.QueryString("Item_ID") & "'", Conn
        Response.Write ("<input type=""text"" readonly size=""30"" style=""{border-style:none;background-color:transparent}"" value=""" & RSAttr("Name") & """>")
        Response.Write ("<input type=""hidden"" name=""Item_ID"" value=""" & RSAttr("Item_ID") & """>")
        RSAttr.Close()
        End If
        %>
      </td>
      <td width="100" class="manage-menu">&nbsp;</td>
    </tr>
    <tr> 
      <td width="148" class="manage-menu-bold">Merchandise Price Description:</td>
      <td width="240" class="manage-menu"> 
        <textarea name="Description" rows="3" cols="35"></textarea>
      </td>
      <td width="100" class="manage-menu">&nbsp;</td>
    </tr>
  </table>
  <table width="500" border="0" cellspacing="0" cellpadding="0" align="center">
    <tr> 
      <td align="center" width="131" class="sub-head">Cost</td>
      <td align="center" width="140" class="sub-head">Value</td>
      <td align="center" width="124" class="sub-head">Display</td>
    </tr>
    <tr align="center"> 
      <td width="131" class="manage-menu"> $ 
        <input type="text" name="cost" size="4">
      </td>
      <td width="140" class="manage-menu"> $ 
        <input type="text" name="gate" size="4">
      </td>
      <td width="124" class="manage-menu"> $ 
        <input type="text" name="display" size="4">
      </td>
    </tr>
    <tr align="center">
      <td width="131" class="manage-menu">&nbsp;</td>
      <td width="140" class="manage-menu">&nbsp;</td>
      <td width="124" class="manage-menu">&nbsp;</td>
    </tr>
    <tr align="center">
      <td width="131" class="manage-menu">&nbsp;</td>
      <td colspan="2" class="manage-menu">Display Pricing for this Merchandise? 
        <input type="checkbox" name="Do_Not_Display_Price" value="1" onClick="MM_showHideLayer_toggle('pricing')"> No</td>
    </tr>
    <tr align="center">
      <td width="131" class="manage-menu">&nbsp;</td>
      <td width="140" class="manage-menu">&nbsp;</td>
      <td width="124" class="manage-menu">&nbsp;</td>
    </tr>
    <tr align="center">
      <td colspan="3" class="manage-menu">
            <div id="pricing" style="position:relative; width:100%; height:30px; z-index:8; left: 0px; top: 0px; visibility: hidden"> 
			    URL For Pricing Information: <input type="text" size="30" name="Pricing_URL" value="http://">
            </div>
	  </td>
    </tr>
  </table>
  <table width="525" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr bgcolor="#5e5ebe">
    <td align="right" width="49%" height="18"><a href="javascript:Sub_Form('1');" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('submitchanges','','images/icon-submit-changes-2.gif',1)"><img src="images/icon-submit-changes.gif" width="200" height="15" name="submitchanges" border="0"></a></td>
      <td width="51%" height="18"><a href="javascript:Sub_Form('2');" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image2','','images/icon-continue-wizard-2.gif',1)"><img src="images/icon-continue-wizard.gif" width="150" height="15" usemap="#continue" border="0" name="Image2"></a></td>
  </tr>
  <tr> 
    <td width="49%">&nbsp;</td>
      <td width="51%"><a href="/Admin/merchandise-images.asp">nex</a>t</td>
  </tr>
</table></form>
</body>
</html>
<% Set Conn = Nothing %>