| 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/nympadmin/ |
Upload File : |
<cfinclude template="header.cfm">
<Cfsetting requesttimeout="600">
<cfset #url.typer# = 2>
<div id="content" style="margin-left:250px;">
<div id="content-header">
<h2> Manage <Cfif #url.typer# eq 1>Photos<cfelse>Videos</cfif></h2>
Click and drag on a item to change the order.
</div>
<div class="container-fluid" >
<cfif parameterexists(url.delete)>
<cfquery name="del" dataSource="#ds#">
delete from multimedia
where id = #url.delete#
</cfquery>
</cfif>
<cfif parameterexists(url.editsaveclient)>
<cfparam name="url.typer" default="0">
<cfparam name="form.video" default="">
<cfquery name="upds" dataSource="#ds#">
update multimedia
set
caption ='#form.caption#',
vidtype = '#form.vidtype#',
regions = '#form.regions#',
video ='#form.video#'
where id = #url.editsaveclient#
</cfquery>
<cfset imagepath="/home/banners/domains/stagemag/temp/">
<cfif parameterexists(form.photo) and #form.photo# is not ''>
<cftry>
<cffile action="upload"
nameconflict="makeunique"
filefield="photo"
accept="image/jpeg,image/pjpeg,image/png"
destination="#imagepath#/#createUUID()#.jpg"
mode="644">
<cfset photo = "#File.ServerFile#">
<cfset photo = replace(photo," ","_","ALL")>
<cffile
action = "rename"
source = "#imagepath#/#File.ServerFile#"
destination = "#imagepath#/#photo#"
mode = "644">
<cfcatch type = "Application">
<!--- the message to display --->
<h3>Invalid image. You must upload a jpg/jpeg/png file.<p> <A HREF="javascript:history.back()">Go back</A>
<cfabort>
</h3>
</cfcatch>
</cftry>
<cfimage source="#imagepath#/#File.ServerFile#" action="resize" destination="#imagepath#/nd#File.ServerFile#" width="300" >
<cffile action = "copy"
destination = "s3://AKIATN2MEJ2RTDTV2LYS:YrqjcSUb0Gg29ProbVrbQ7Uk4oWIeFRUOc19ByG5@cloudimages.broadwayworld.com/stagemag"
source="/home/banners/domains/stagemag/temp/#photo#"
mode="777">
<cffile
action = "delete"
file = "/home/banners/domains/stagemag/temp/#photo#">
<cffile action = "copy"
destination = "s3://AKIATN2MEJ2RTDTV2LYS:YrqjcSUb0Gg29ProbVrbQ7Uk4oWIeFRUOc19ByG5@cloudimages.broadwayworld.com/stagemag"
source="/home/banners/domains/stagemag/temp/nd#photo#"
mode="777">
<cffile
action = "delete"
file = "/home/banners/domains/stagemag/temp/nd#photo#">
<cfquery name="upds" dataSource="#ds#">
update multimedia
set
image ='#photo#'
where id = #url.editsaveclient#
</cfquery>
</cfif>
<cfif ParameterExists(form.buttarticleman)>
<cflocation url="/listingsmultimedia.cfm?id=#url.editsaveclient#&programid=#url.programid#&typer=#url.typer#" addToken="no">
<Cfelse>
<cflocation url="/listingsmultimedia.cfm?programid=#url.programid#&typer=#url.typer#" addtoken="no">
</cfif>
</cfif>
<cfif parameterexists(url.add)>
<cfquery name="getordernum" datasource="#ds#">
select ordernum from multimedia
where programid = #url.programid#
and typer = #url.typer#
order by ordernum desc
limit 0,1
</cfquery>
<cfif #getordernum.recordcount# eq 0>
<Cfset newordernum =1>
<cfelse>
<Cfset newordernum =#getordernum.ordernum#>
</cfif>
<cfquery name=addphoto datasource="#ds#">
INSERT INTO multimedia(
programid,ordernum,typer)
VALUES(
#url.programid#,#newordernum#,#url.typer#
)
</cfquery>
<cfquery name="Getblast" datasource="#ds#">
select id from multimedia
order by id desc limit 0,1
</cfquery>
<cflocation url="/listingsmultimedia.cfm?programid=#url.programid#&edit=#getblast.id#&typer=#url.typer#" addtoken="no" statuscode="301">
</cfif>
<Table style="background-color:#b20223;margin-top:10px;"><Tr>
<Td style="vertical-align:middle;padding:6px;border:4px;border-color:white;border-style:solid;">
<a href="listingsmultimedia.cfm?add=on&programid=<cfoutput>#url.programid#&typer=#url.typer#</cfoutput>" style="color:white;">Add <cfif #url.typer# eq 1>Photo<cfelse>Video</cfif></a>
</Td>
<Td style="vertical-align:middle;padding:6px;border:4px;border-color:white;border-style:solid;">
<a href="https://admin.nymetroparents.com/listingseditpk.cfm?id=<cfoutput>#url.programid#</cfoutput>&table=ParentsListings&cat=ADD%20&%20ADHD&catid=87" style="color:white;">Back to Microsite Edit</a>
</Td>
</tr>
</table>
<br>
<cfif parameterexists(url.edit)>
<cfquery name="geter" dataSource="#ds#">
select * from multimedia
where programid = #url.programid# and id = #url.edit#
</cfquery>
<cfif #geter.image# is not ''>
<cfoutput><img src="https://cloudimages.broadwayworld.com/stagemag/nd#geter.image#" style='max-height:100px;float:left;'>
</cfoutput>
</cfif>
<FORM action="listingsmultimedia.cfm?editsaveclient=<cfoutput>#url.edit#&programid=#url.programid#&typer=#url.typer#</cfoutput>" method="post" enctype="multipart/form-data">
<Table style="max-width:600px;"><Tr><Td style="width: 50%;vertical-align: top;">
<div class="form-group">
<label class="col-md-12" style="margin-top: 10px;">Type </label>
<div class="col-md-12">
<select name="vidtype">
<cfoutput><option value="#geter.vidtype#">#geter.vidtype#</option></cfoutput>
<option value="Camp Fair">Camp Fair</option>
<option value="Camp Fair - Sleepaway">Camp Fair - Sleepaway</option>
<option value="Camp Fair - Advice from Camp Directors">Camp Fair - Advice from Camp Directors</option>
<option value="School Showcase">School Showcase</option>
</select>
</div>
<label class="col-md-12" style="margin-top: 10px;">Caption </label>
<div class="col-md-12">
<input name="caption" style="width:500px" type="text" class="form-control" value="<Cfoutput>#geter.caption#</Cfoutput>">
</div>
<label class="col-md-12" style="margin-top: 10px;">Regions </label>
<input name="regions" type="checkbox" value="Manhattan" <Cfif #geter.regions# contains 'Manhattan'>Checked</cfif>> Manhattan
<input name="regions" type="checkbox" value="Brooklyn" <Cfif #geter.regions# contains 'Brooklyn'>Checked</cfif>> Brooklyn
<input name="regions" type="checkbox" value="Queens" <Cfif #geter.regions# contains 'Queens'>Checked</cfif>> Queens
<input name="regions" type="checkbox" value="Westchester" <Cfif #geter.regions# contains 'Westchester'>Checked</cfif>> Westchester
<input name="regions" type="checkbox" value="Rockland" <Cfif #geter.regions# contains 'Rockland'>Checked</cfif>> Rockland
<input name="regions" type="checkbox" value="Nassau" <Cfif #geter.regions# contains 'Nassau'>Checked</cfif>>Nassau
<input name="regions" type="checkbox" value="Suffolk" <Cfif #geter.regions# contains 'Suffolk'>Checked</cfif>> Suffolk
<p></p>
<cfif #url.typer# eq 2>
<label class="col-md-12" style="margin-top: 10px;">Video Embed Code</label>
<Textarea name="video" style="width:300px;height:100px;"><cfoutput>#geter.video#</cfoutput></Textarea>
<Cfelse>
<label class="col-md-12" style="margin-top: 10px;">Photo (Recommended 1000 pixels wide)</label>
<div class="col-md-12">
<input type=file name="photo">
</div>
</cfif>
</div>
</div>
<center>
<br><!---<button type="submit" class="btn btn-success"> <i class="fa fa-check"></i> Save Entry</button>--->
<input type="submit" Value="Upload" name="buttadminman" id="cdh_buttadminman" class="btn btn-danger btn-large" style="font:bold 18px;color:white">
</center>
<br>
</form>
<cfelse>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/TableDnD/1.0.4/jquery.tablednd.min.js"></script>
<Cfif parameterexists(form.sort_order)>
<!--- strip the 'section_id_' from the list, so that we only have a list of ids --->
<cfset form.sort_order = ReplaceNoCase(form.sort_order, "section_id_", "", "all") />
<cfloop from="1" to="#ListLen(form.sort_order)#" index="ndx">
<cfquery name="qryOrder" datasource="#ds#">
update multimedia set
ordernum = <cfqueryparam value="#ndx#" cfsqltype="cf_sql_integer" />
where id = <cfqueryparam value="#ListGetAt(form.sort_order, ndx)#" cfsqltype="cf_sql_integer" />
</cfquery>
</cfloop>
</cfif>
<script type="text/javascript">
<!-- <![CDATA[
$(function(){
$("#sortable-tbl").tableDnD();
$('#frm-sort').submit(function(){
var sRowOrder = "";
$("#sortable-tbl tr").each(function(i,o){
if (sRowOrder.length) {
sRowOrder += "," + o.id;
} else {
sRowOrder = o.id;
}
});
$('#sort_order').val(sRowOrder);
});
});
// ]]> -->
</script>
<Cfquery name="getcast" datasource="#ds#">
select * from multimedia
where programid = #url.programid#
and typer = #url.typer#
order by ordernum
</Cfquery>
<style type="text/css">
.video-container {
position:relative;
padding-bottom:56.25%;
padding-top:30px;
height:0;
margin-bottom:20px;
overflow:hidden;
}
.video-container iframe, .video-container object, .video-container embed {
position:absolute;
top:0;
left:0;
width:100%;
height:100%;
}
</style>
<table id="sortable-tbl" border="1" style="max-width:800px;">
<Cfoutput query="Getcast">
<tr id="section_id_#id#">
<td style="padding:4px;">#caption#</td>
<td style="padding:4px;<Cfif #video# is not ''>width:300px;</cfif>">
<cfif #image# is not ''>
<img src="https://cloudimages.broadwayworld.com/stagemag/nd#image#" style='max-height:100px;float:left;'>
<cfelse>
<div class="video-container">
#video#
</div>
</cfif>
</td>
<Td style="padding:4px;"><a href="listingsmultimedia.cfm?edit=#id#&programid=#url.programid#&typer=#url.typer#">edit</a></Td>
<Td style="padding:4px;"><a href="listingsmultimedia.cfm?delete=#id#&programid=#url.programid#&typer=#url.typer#" onclick="return confirm('Are you sure?');">delete</a></Td>
</tr>
</Cfoutput>
</table>
<br>
<form id="frm-sort" action="/listingsmultimedia.cfm?programid=<cfoutput>#url.programid#&typer=#url.typer#</cfoutput>" method="post">
<input type="submit" name="save" id="save" value="save" />
<input type="hidden" name="sort_order" id="sort_order" value="" />
</form>
</cfif>
</div>
<!--Footer-part-->
<br><br><br><br>
<cfinclude template="footer.cfm">