| Server IP : 172.67.201.108 / Your IP : 216.73.216.11 Web Server : Apache/2.4.68 (Amazon Linux) OpenSSL/3.5.5 System : Linux ip-172-31-69-123.ec2.internal 6.1.176-223.369.amzn2023.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Jul 24 13:34:27 UTC 2026 x86_64 User : ec2-user ( 1000) PHP Version : 8.4.23 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/home2/cgny/public_html/newadmin/ |
Upload File : |
<cfinclude template="header.cfm">
<div id="content">
<div id="content-header">
</div>
<div class="container-fluid" style="margin-left:200px;">
<cfif parameterexists(getuser.id)>
<table border=0 width=100% cellpadding=0 cellspacing=0>
<tr><Td style="padding:5px;" valign=top>
<cfset ds='cityguide'>
<Cfif parameterexists(url.editme)>
<Cfquery name="upds" dataSource="#ds#">
update ListingsRelated
set link = '#form.link#',
linktitle = '#form.linktitle#'
where id = #url.editme#
</cfquery>
<cflocation url="uploadrelated.cfm?itemid=#url.itemid#&tablename=#url.table#">
</Cfif>
<cfif IsDefined("action")>
<cfoutput><span class="header">Manage Related Links</span></strong></cfoutput>
<p>
<CFSET CurrentDateTime = #CreateODBCDateTime(Now())#>
<cfquery name=addphoto datasource=#ds#>
INSERT INTO ListingsRelated(link,linktitle,linktype,tablename,itemid,mag,itemname,uploaddate)
VALUES('#form.link#','#form.linktitle#','#form.linktype#','#url.tablename#',#url.itemid#,#form.mag#,'#form.itemname#',#currentdatetime#)
</cfquery>
<cfif #form.mag# eq '1' or #form.mag# eq '3'>
<Cfquery name="getstats" datasource="cg22">
select
ListingsRelated
from #url.tablename#
where id = #url.itemid#
</Cfquery>
<cfset x = #getstats.ListingsRelated# +1>
<CFQUERY datasource="cg22">
UPDATE #url.tablename# SET
ListingsRelated = #x#
where id = #url.itemid#
</cfquery>
</cfif>
<cfif #form.mag# eq '2' or #form.mag# eq '3'>
<Cfquery name="getstats" datasource="cg22">
select
MLListingsRelated
from #url.tablename#
where id = #url.itemid#
</Cfquery>
<cfset x = #getstats.mllistingsrelated# +1>
<CFQUERY datasource="cg22">
UPDATE #url.tablename# SET
MLListingsRelated = #x#
where id = #url.itemid#
</cfquery>
</cfif>
<cflocation url="uploadrelated.cfm?itemid=#url.itemid#&tablename=#url.tablename#">
<Cfelseif parameterexists(url.edit)>
<cfquery name="getcoupons" datasource="cg22">
select *
from ListingsRelated
where id= #url.edit#
</cfquery>
<cfform action="uploadrelated.cfm?editme=#url.edit#&table=#url.table#&itemid=#url.itemid#" method=post enctype="multipart/form-data"><table>
<tr><Td style="padding:5px;" valign=top><font face=verdana size=-1><strong>Link:</strong> </font></td><td><cfinput type=text name="link" size="80" required="yes" message="You must enter a link" value="#getcoupons.link#">
</td></tr>
<tr><Td style="padding:5px;" valign=top><font face=verdana size=-1><strong>Link Title:</strong> </font></td><td><cfinput type=text name="linktitle" size="80" required="yes" message="You must enter a title" value="#getcoupons.linktitle#">
</td></tr>
</table>
<p>
<div align="center"><input type=submit name=submit value="Update Link"></div>
</cfform>
<Cfabort>
<cfelse>
<table border=0 cellspacing=0 cellpadding=6 100%>
<tr><Td style="padding:5px;" width=100% valign=top>
<cfoutput><span class="header">Manage Related Links</span></strong></cfoutput>
<p>
<cfquery name="getcoupons" datasource="cg22">
select *
from ListingsRelated
where tablename='#url.tablename#' and itemid=#url.itemid#
</cfquery>
<ul>
<cfif #getcoupons.recordcount# gt 0>
<cfoutput query="getcoupons">
<li><a href="#link#">#linktitle#</a> (#linktype#) | <cfif #mag# eq '1'>(CityGuide)</cfif>
| <a href="deleterelated.cfm?id=#id#&table=#url.tablename#&itemid=#url.itemid#" onClick="return confirm('Are you sure?');">delete related</a>
| <a href="uploadrelated.cfm?edit=#id#&table=#url.tablename#&itemid=#url.itemid#" >edit</a>
</cfoutput>
</cfif>
</ul>
</font>
<p>
<cfform action="uploadrelated.cfm?action=submit&itemid=#url.itemid#&tablename=#url.tablename#" method=post enctype="multipart/form-data"><table>
<tr><Td style="padding:5px;" valign=top><font face=verdana size=-1><strong>Listing Name:</strong> </font></td><td><cfinput type=text name="itemname" required="yes" message="You must enter a name">
</td></tr>
<tr><Td style="padding:5px;" valign=top><font face=verdana size=-1><strong>Link:</strong> </font></td><td><cfinput type=text name="link" size="80" required="yes" message="You must enter a link">
</td></tr>
<tr><Td style="padding:5px;" valign=top><font face=verdana size=-1><strong>Link Title:</strong> </font></td><td><cfinput type=text name="linktitle" size="80" required="yes" message="You must enter a title">
</td></tr>
<tr><Td style="padding:5px;" valign=top><font face=verdana size=-1><strong>Link Type:</strong> </font></td><td> <select NAME="linktype" size="1">
<option value="Review">Review</option>
<option value="Tickets">Purchase Tickets</option>
<option value="Video">Video</option>
<option value="Gift">Gift Certificate</option>
</select>
</td></tr>
<tr><Td style="padding:5px;" valign=top><font face=verdana size=-1><strong>Magazine:</strong> </font></td><td>
<select name="mag">
<option value="1">CityGuide</option>
</select>
</td></tr>
</table>
<p>
<div align="center"><input type=submit name=submit value="Add Link"></div>
</cfform>
</td></tr></table>
</cfif>
</td></tr></table>
</cfif>
<cfinclude template="footer.cfm">