| Server IP : 104.21.21.239 / 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 valign=top>
<cfif IsDefined("action")>
<cfset imagedir="https://www.cityguideny.com/listingsphotos">
<cfset thumbdir="https://www.cityguideny.com/listingsphotos">
<cfoutput><span class="header">Upload Listings Photos</span></strong></cfoutput>
<p>
<cfset imagepath="/home/home2/cgny/public_html/2019/listingsphotos/">
<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">
<cfset thumbnail = 'nd#photo#'>
<!---Outputs the variables #photo# and #thumbnail#--->
<CFSET CurrentDateTime = #CreateODBCDateTime(Now())#>
<cfquery name=addphoto datasource=#ds#>
INSERT INTO ListingsPhotos(photo, thumbnail,tablename,itemid,description,mag)
VALUES('#photo#', '#thumbnail#','#url.tablename#',#url.itemid#,'#description#',#form.mag#)
</cfquery>
<cfif #form.mag# eq '1' or #form.mag# eq '3'>
<Cfquery name="getstats" datasource="cg22">
select
ListingsPhotos
from #url.tablename#
where id = #url.itemid#
</Cfquery>
<cfset x = #getstats.listingsphotos# +1>
<CFQUERY datasource="cg22">
UPDATE #url.tablename# SET
ListingsPhotos = #x#
where id = #url.itemid#
</cfquery>
</cfif>
<cfif #form.mag# eq '2' or #form.mag# eq '3'>
<Cfquery name="getstats" datasource="cg22">
select
MLListingsPhotos
from #url.tablename#
where id = #url.itemid#
</Cfquery>
<cfset x = #getstats.mllistingsphotos# +1>
<CFQUERY datasource="cg22">
UPDATE #url.tablename# SET
MLListingsPhotos = #x#
where id = #url.itemid#
</cfquery>
</cfif>
<cfimage source="#imagepath#/#photo#" name="myImage">
<cfset width=#ImageGetWidth(myImage)#>
<cfif #width# gt 1000>
<CF_GraphicsMagick action="ResizeWidth" Infile="#imagepath#/#photo#" width="1000" filter="Catrom" Outfile="#imagepath#/#photo#" quality="90">
<cfelse>
<CF_GraphicsMagick action="ResizeWidth" Infile="#imagepath#/#photo#" width="#width#" filter="Catrom" Outfile="#imagepath#/#photo#" quality="90">
</cfif>
<CF_GraphicsMagick action="ResizeWidth" Infile="#imagepath#/#photo#" width="300" filter="Catrom" Outfile="#imagepath#/and#photo#" quality="90">
<cffile
action = "copy"
destination = "#imagepath#/nd#photo#"
source = "#imagepath#/and#photo#"
mode = "777">
<cflocation url="listingsedit.cfm?id=#url.itemid#&table=#url.tablename#">
</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 width=100% valign=top>
<cfoutput><span class="header">Upload Listings Photo</span></strong></cfoutput>
<p>
</ul>
</font>
<p>
<cfoutput>
<form action="uploadlistingsphoto.cfm?action=submit&itemid=#url.itemid#&tablename=#url.tablename#" method=post enctype="multipart/form-data"></cfoutput>
<table>
<tr><td valign=top><font face=verdana size=-1><strong>Magazine:</strong> </font></td><td>
<select name="mag">
<option value="1">CityGuide</option>
</select>
</td></tr>
<tr><td valign=top><font face=verdana size=-1><strong>Image:</strong> </font></td><td><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 valign=top><font face=arial size=-1><strong>Description:</strong> </td><td width=250><font face=arial size=-1><textarea NAME="description" 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>
<cfinclude template="footer.cfm">