| Server IP : 172.67.201.108 / Your IP : 216.73.216.191 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 : |
<cfquery name="gets" dataSource="#ds#">
select * from
ListingsCoupons
where seo_friendly = '' or seo_friendly is NULL
</cfquery>
<cfoutput query="Gets">
<cfset moveurl = reReplace(itemname, "([^[:alnum:]|[:blank:]]) ", "", "all")>
<cfset moveurl = #reReplaceNoCase(moveurl, "[^a-z0-9]", "-", "all")#>
<Cfset moveurl = rereplace(moveurl," ","-","ALL")>
<cfset moveurl = rereplace(moveurl,"'","-","ALL")>
<cfset xxx = len(moveurl)>
<cfset xxx2 = xxx -1>
<Cfif #left(moveurl,1)# eq '-'>
<cfset moveurl = '#right(moveurl,xxx2)#'>
</cfif>
<cfset xxx = len(moveurl)>
<cfset xxx2 = xxx -1>
<Cfif #left(moveurl,1)# eq '-'>
<cfset moveurl = '#right(moveurl,xxx2)#'>
</cfif>
<Cfset moveurl = '#moveurl#-#dateformat(expire,"yyyy-mm-dd")#'>
<cfquery name="upds" dataSource="#ds#">
update ListingsCoupons
set seo_friendly = '#moveurl#'
where id = #id#
</cfquery>
</cfoutput>
<cfquery name="gets" dataSource="#ds#">
select * from
ListingsCoupons
order by seo_friendly
</cfquery>
<cfoutput query="Gets">
<Cfif #gets.seo_friendly# eq '#gets.seo_friendly[currentrow-1]#'>
<cfquery name="upds" dataSource="#ds#">
update ListingsCoupons
set seo_friendly = '#seo_friendly#-#id#'
where id = #id#
</cfquery>
</Cfif>
</cfoutput>
<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;" style="padding:5px;" valign=top>
<cfset ds='cityguide'>
<cfif IsDefined("action")>
<cfoutput><span class="header">Upload Coupon</span></strong></cfoutput>
<p>
<cfset imagepath="/home/home2/cgny/public_html/listingscoupons/">
<cffile action="upload"
accept="image/jpeg,image/pjpeg"
nameconflict="makeunique"
filefield="photo"
destination="#imagepath#">
<cfif #left(photo,3)# is not 'bmp'>
<cfset photo = "#File.ServerFile#">
<cfset photo = replace(photo," ","_","ALL")>
<cffile
action = "rename"
source = "#imagepath#/#File.ServerFile#"
destination = "#imagepath#/#photo#"
mode = "644">
<Cfparam name="form.website" default="" >
<CFSET CurrentDateTime = #CreateODBCDateTime(Now())#>
<cfquery name=addphoto datasource=#ds#>
INSERT INTO ListingsCoupons(linkfile, expire,tablename,itemid,description,mag,uploaddate,itemname,website,longdescription)
VALUES('#photo#', '#form.expire#','#url.tablename#',#url.itemid#,'#description#',#form.mag#,'#form.uploaddate#','#form.itemname#','#form.website#','#form.longdescription#')
</cfquery>
<cfquery name="updatecount" datasource="#ds#">
update #url.tablename#
set ListingCoupons = listingcoupons + 1
where id = #url.itemid#
</cfquery>
<cflocation url="uploadcoupon.cfm?itemid=#url.itemid#&tablename=#url.tablename#" addToken="no">
</cfif>
<cfelseif parameterexists(url.name)>
<cfset imagedir="https://www.cityguideny.com/listingsphotos">
<cfset thumbdir="https://www.cityguideny.com/listingsphotos">
<cfoutput><center><p>
<font face=arial size=-1>
<strong> Here's the image you uploaded:<br></strong>
<img src="#imagedir#/#url.name#" border=1><br><br>
<strong> Here's the dynamic thumbnail we've created:<br></strong>
<img src="#thumbdir#/nd#url.name#" border=1><br><br>
</cfoutput> </div>
<p>
<cfelse>
<table border=0 cellspacing=0 cellpadding=6 100%>
<tr><td style="padding:5px;" style="padding:5px;" width=100% valign=top>
<cfoutput><span class="header">Upload / Manage Coupons</span></strong></cfoutput>
<p>
<cfquery name="gett" datasource="cg22">
select *
from #url.tablename#
where id=#url.itemid#
</cfquery>
<font face=verdana size=+1><cfoutput>#gett.name#</cfoutput></font>
<p></p>
<cfquery name="getcoupons" datasource="cg22">
select *
from ListingsCoupons
where tablename='#url.tablename#' and itemid=#url.itemid#
</cfquery>
<ul>
<cfif #getcoupons.recordcount# gt 0>
<table border="1" cellpadding="4" cellspacing="0">
<Tr bgcolor="black">
<td style="padding:5px;" ><font face=verdana size=-1 color="white"><strong><strong>NAME</strong></strong></font></td>
<td style="padding:5px;" ><font face=verdana size=-1 color="white"><strong><strong>DOWNLOADS</strong></strong></font></td>
<td style="padding:5px;" ><font face=verdana size=-1 color="white"><strong><strong>DATES</strong></strong></font></td>
<td style="padding:5px;" ><font face=verdana size=-1 color="white"><strong><strong>MISC</strong></strong></font></td>
</TR>
<cfoutput query="getcoupons">
<tr>
<td style="padding:5px;" ><font face=verdana size=-2>
<a href="https://www.cityguideny.com/listingscoupons/#linkfile#"><font face=verdana size=-2>#description# - view coupon</font></a> <!--Expire: #dateformat(expire,'m/d/yy')# -->
<Cfquery name="getx" datasource="cg22">
select sum(views) as counter
from ListingsCouponStats
where showid = #getcoupons.id#
</Cfquery>
<Cfquery name="gety" datasource="cg22">
select showdate
from ListingsCouponStats
where showid = #getcoupons.id#
order by id
</Cfquery>
<Cfquery name="getz" datasource="cg22">
select showdate
from ListingsCouponStats
where showid = #getcoupons.id#
order by id desc
</Cfquery>
</td><td style="padding:5px;" >
<font face=verdana size=-2>
#getx.counter#</td><td style="padding:5px;" ><font face=verdana size=-2>#dateformat(gety.showdate,'m/d/yy')# to #dateformat(expire,'m/d/yy')#</td><td style="padding:5px;" ><font face=verdana size=-2> <a href="deletecoupon.cfm?id=#id#&table=#url.tablename#&itemid=#url.itemid#" onClick="return confirm('Are you sure?');">expire</a> | <a href="editcoupon.cfm?id=#id#&table=#url.tablename#&itemid=#url.itemid#">edit</a> | <cfif #getcoupons.advertiser# eq '0'><a href="makecouponadvertiser.cfm?id=#id#&table=#url.tablename#&itemid=#url.itemid#&new=1">Not Highlighted</a><cfelse><a href="makecouponadvertiser.cfm?id=#id#&table=#url.tablename#&itemid=#url.itemid#&new=0">Highlighted</a></font></cfif>
</td></tr>
</cfoutput>
</table>
</cfif>
</ul>
</font>
<p>
<cfoutput>
<form action="uploadcoupon.cfm?action=submit&itemid=#url.itemid#&tablename=#url.tablename#" method=post enctype="multipart/form-data"></cfoutput>
<table>
<tr><td style="padding:5px;" style="padding:5px;" valign=top><font face=verdana size=-1><strong>Listing Name:</strong> </font></td><td style="padding:5px;" ><input type=text name="itemname"><input type=hidden name="itemname_requred" value="You must include a name for this listing!">
</td></tr>
<tr><td style="padding:5px;" style="padding:5px;" valign=top><font face=verdana size=-1><strong>Coupon:</strong> </font></td><td style="padding:5px;" ><input type=file name="photo"><input TYPE="hidden" NAME="photo_required" VALUE="Please press browse to select a photo to upload.">
</td></tr>
<tr><td style="padding:5px;" style="padding:5px;" valign=top><font face=verdana size=-1><strong>Web Site (Optional):</strong> </font></td><td style="padding:5px;" ><input type=text name="website">
</td></tr>
<tr><td style="padding:5px;" style="padding:5px;" valign=top><font face=verdana size=-1><strong>Magazine:</strong> </font></td><td style="padding:5px;" >
<select name="mag">
<option value="1">CityGuide</option>
</select>
</td></tr>
<tr><td style="padding:5px;" style="padding:5px;" valign=top><font face=verdana size=-1><strong>Expiration Date (yyyy-mm-dd):</strong> </font></td><td style="padding:5px;" ><input type=text name="expire">
</td></tr>
<cfoutput>
<input type=hidden name="uploaddate" value="#dateformat(currentdatetime,'mm/dd/yyyy')#"></cfoutput>
<tr><td style="padding:5px;" style="padding:5px;" valign=top><font face=arial size=-1><strong>Description:</strong> </td><td style="padding:5px;" style="padding:5px;" width=250><font face=arial size=-1><textarea NAME="description" ROWS="3" COLS="55"></textarea></td></tr>
<tr><td style="padding:5px;" style="padding:5px;" valign=top><font face=arial size=-1><strong>Long Description:</strong> </td><td style="padding:5px;" style="padding:5px;" width=250><font face=arial size=-1><textarea NAME="longdescription" ROWS="10" COLS="55"></textarea></td></tr>
<input type=hidden name=checker>
<input type=hidden name=maxsize value="">
<input type=hidden name=thumbsize value="150">
<cfoutput query=getuser>
<input type=hidden name=prefix value="#id#">
</cfoutput>
</table>
<p>
<div align="center"><input type=submit name=submit value="Upload"></div>
</form>
</td></tr></table>
</cfif>
</td></tr></table>
</cfif>