Commit 35b4a1a1 authored by John P. Willis's avatar John P. Willis

Initial commit

parents
<html>
<head>
<title>The File Spa</title>
<link href="cld.css" rel="stylesheet" type="text/css">
</head>
<body>
<cfapplication name="fistspa" clientmanagement="yes" sessionmanagement="yes" setclientcookies="yes">
<cfparam name="session.loggedin" default="no">
<cfparam name="session.username" default="">
<cfparam name="session.datasource" default="fistspa">
<cfquery name="stats" datasource="#session.datasource#">
SELECT * FROM users WHERE username='#session.username#'
</cfquery>
<center>
<table width="100%" border="1">
<tr>
<td height="100" class="masthead"><div align="center">THE FILE SPA</div></td>
</tr>
<tr>
<td class="topnav">
<cfif #session.loggedin# EQ "yes">
<a href="default.cfm">Home</a> |
<a href="default.cfm">New Arrivals</a> |
<a href="newthumbs.cfm">New Image Thumbnails</a> |
<a href="logoff.cfm">Log Off</a>
<cfelse>
<form name="login" action="dologin.cfm" method="post">
<label>Username:<input type="text" name="username"></label> <label>Password:<input type="password" name="password"></label><input type="submit" class="normalButton" value="Submit" name="Submit">
</form>
</cfif>
</td>
</tr>
<cfif #session.loggedin# EQ "yes">
<tr>
<td class="topnav">
<cfoutput>
Uploads: #stats.ulcount# | Downloads: #stats.dlcount# | Logged In As: #session.username#
</cfoutput>
</td>
</tr>
</cfif>
</table>
<br>
</center>
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
<link href="cld.css" rel="stylesheet" type="text/css">
</head>
<body>
<center>
<br>
<table width="100%">
<tr><td align="center"><strong>The File Spa</strong></td>
</tr>
<tr>
<td align="center"><i>The only way to file!</i></td></tr>
</table>
</center>
</body>
</html>
This diff is collapsed.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>The File Spa</title>
<link href="cld.css" rel="stylesheet" type="text/css">
</head>
<body>
<cfquery name="files" datasource="#session.datasource#">
SELECT * FROM uploads ORDER BY date DESC
</cfquery>
<cfquery name="myul" datasource="#session.datasource#">
SELECT * FROM uploads WHERE username='#session.username#'
</cfquery>
<cfquery name="uls" datasource="#session.datasource#">
SELECT * FROM users ORDER BY ulcount DESC
</cfquery>
<center>
<cfif #session.loggedin# EQ "yes">
<table width="100%" border="0" class="st" cellspacing="0">
<tr>
<td class="sthdr" height="10">TOP SITE CONTRIBUTORS</td>
<td class="sthdr" height="10">&nbsp;</td>
</tr>
<tr>
<td><strong>User</strong></td>
<td><strong>Uploads</strong></td>
</tr>
<cfoutput query="uls" maxrows="10">
<tr>
<td>#username#</td>
<td>#ulcount#</td>
</tr>
</cfoutput>
</table>
<br>
<form action="uploadfileaction.cfm" enctype="multipart/form-data" method="post">
<table width="100%" border="0" class="st">
<tr>
<td align="left" class="sthdr" height="10">UPLOAD FILE</td>
<td class="sthdr">
</td>
</tr>
<tr>
<td>
Title:
</td>
<td><input type="text" name="title"></td>
</tr>
<tr>
<td>Media Type:</td>
<td><p>
<label>
<input type="radio" name="media" value="Movie" checked>
Movie</label>
<br>
<label>
<input type="radio" name="media" value="Still Picture">
Still Picture</label>
<br>
<label>
<input type="radio" name="media" value="Other">
Other</label>
<br>
</p></td>
</tr>
<tr>
<td>
<label>Category:</label>
</td>
<td><select name="category">
<option value="Any">Any</option>
</select>
</td>
</tr>
<tr>
<td>Comments:</td>
<td><textarea name="comments" cols="50"></textarea></td>
</tr>
<tr>
<td height="10" align="left" valign="middle">File:</td>
<td><input name="FiletoUpload" type="file" ></td>
</tr>
<tr>
<td></td>
<td align="right" valign="bottom"><input type="submit" class="normalButton" value="Upload"></td>
</tr>
</table>
<cfoutput>
<input type="hidden" name="date" value="#Now()#">
<input type="hidden" name="username" value="#session.username#">
</cfoutput>
</form>
<table width="100%" border="0" class="st">
<tr>
<td class="sthdr">FILES AVAILABLE</td>
</tr>
</table>
<table width="100%" border="0" class="st">
<tr>
<th>Title</th>
<th>Media</th>
<th>Category</th>
<th>Date</th>
<th>User</th>
<th>Downloads</th>
</tr>
<cfoutput query="files">
<tr>
<td><a href="fileinfo.cfm?id=#id#"><cfif #title# NEQ "">#title#<cfelse>(No Title)</cfif></a></td>
<td>#media#</td>
<td>#category#</td>
<td>#date#</td>
<td>#username#</td>
<td>#dlcount#</td>
</tr>
</cfoutput>
</table>
<br>
<table width="100%" cellspacing="0" border="0" class="st">
<tr>
<th class="sthdr">MY UPLOADS</th>
</tr>
<cfoutput query="myul">
<tr>
<td class="bodytabl">
#title#
</td>
</tr>
</cfoutput>
</table>
</cfif>
</center>
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>The File Spa</title>
<link href="cld.css" rel="stylesheet" type="text/css">
</head>
<cfquery name="l" datasource="#session.datasource#">
SELECT * FROM users WHERE username='#form.username#' AND password='#form.password#'
</cfquery>
<body>
<cfif #l.RecordCount# EQ 1>
<cfset session.username="#form.username#">
<cfset session.loggedin="yes">
<cflocation url="default.cfm" addtoken="no">
<cfelse>
<center>
<p>Bad username or password</p>
<p><a href="default.cfm">Try Again</a></p>
</center>
</cfif>
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Download</title>
<link href="cld.css" rel="stylesheet" type="text/css">
</head>
<body>
<cfquery name="dl" datasource="#session.datasource#">
INSERT INTO downloads (username, date, fileid) VALUES ('#session.username#', #Now()#, #url.id#)
</cfquery>
<cfquery name="dc" datasource="#session.datasource#">
UPDATE uploads SET dlcount=dlcount+1 WHERE id='#URL.id#'
</cfquery>
<cfquery name="uduser" datasource="#session.datasource#">
UPDATE users SET dlcount=dlcount+1 WHERE username='#session.username#'
</cfquery>
<cfquery name="g" datasource="#session.datasource#">
SELECT * FROM uploads WHERE id='#URL.id#'
</cfquery>
<center>
<table width="300" border="0" cellspacing="0" class="st">
<tr>
<th class="sthdr">
DOWNLOAD FILE
</th>
</tr>
<tr>
<cfoutput>
<td class="bodytabl" align="center"><a href="/filespa/incoming/#g.filetoupload#">#g.title#</a></td>
</cfoutput>
</tr>
</table>
</center>
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>File Info</title>
<link href="cld.css" rel="stylesheet" type="text/css">
</head>
<body>
<cfquery name="f" datasource="#session.datasource#">
SELECT * FROM uploads WHERE id='#url.id#'
</cfquery>
<cfquery name="dlh" datasource="#session.datasource#">
SELECT * FROM downloads WHERE fileid='#url.id#'
</cfquery>
<cfdirectory directory="/home/chocolatejollis/filespa/incoming" name="fi" sort="dateLastModified DESC" filter="#f.filetoupload#">
<center>
<table class="st" width="800" cellspacing="0">
<tr>
<td width="60%">
<cfoutput>
<h1>#f.title#</h1>
<p><strong>Media Type:</strong> #f.media#</p>
<p><strong>Category:</strong> #f.category#</p>
<img src="/filespa/incoming/#f.filetoupload#" width="400">
</cfoutput>
</td>
<td width="40%" valign="top">
<!---File Download Box--->
<cfoutput>
<form name="download" action="download.cfm?id=#f.id#" method="post">
<table width="100%" cellspacing="0">
<tr>
<th class="sthdr">FILE DOWNLOAD</th>
<th class="sthdr">&nbsp;</th>
</tr>
<tr>
<td>File Size:</td>
<td>#fi.size#</td>
</tr>
<tr>
<td>Download Count:</td>
<td>#f.dlcount#</td>
</tr>
<tr>
<td>Uploaded On:</td>
<td>#f.date#</td>
</tr>
<tr>
<td>Uploaded By:</td>
<td>#f.username#</td>
</tr>
<tr>
<td colspan="2" align="center"><input type="submit" class="normalButton" name="submit" value="Download Now"></td>
</tr>
</table>
</cfoutput>
</form>
<h3>Comments</h3>
<cfoutput><p>#f.comments#</p></cfoutput>
<table width="100%" cellspacing="0" class="st">
<tr>
<th class="sthdr">DOWNLOAD HISTORY</th>
</tr>
<cfoutput query="dlh" maxrows="10">
<tr>
<td class="bodytabl">
#username# on #date#
</td>
</tr>
</cfoutput>
</table>
</td>
</tr>
</table>
</center>
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>File Spa</title>
</head>
<body>
<cfset session.loggedin="no">
<cfset session.username="">
<cflocation url="default.cfm" addtoken="no">
</body>
</html>
<html>
<head>
<title>New Image Thumbnails</title>
</head>
<body>
<cfdirectory directory="/export/home/warm/public_html/incoming" filter="*.jpg" sort="dateLastModified DESC" name="newThumbs">
<br>
<br>
<center>
<table width="800" border="1">
<cfoutput query="newThumbs">
<tr>
<td>#Name#</td>
<td width="101" align="center"><a href="http://www.clogic-int.com/~warm/incoming/#name#"><img src="http://www.clogic-int.com/~warm/incoming/#Name#" height="100" width="100"></a></td>
</tr>
</cfoutput>
</table>
</center>
</body>
</html>
\ No newline at end of file
<html>
<head>
<title>New Arrivals</title>
<link href="cld.css" rel="stylesheet" type="text/css">
</head>
<body>
<br>
<center>
<cfif #session.loggedin# EQ "yes">
<cfdirectory directory="/export/home/warm/public_html/incoming" name="newArrivals" sort="dateLastModified DESC">
<table width="800" border="0" class="cathdr">
<tr>
<td class="cathdr">New Arrivals</td>
</tr>
</table>
<table width="800" border="0" class="sttabl">
<tr>
<th class="sthdr">File Name</th>
<th class="sthdr">File Size</th>
</tr>
<cfoutput query="newArrivals">
<tr>
<td><a href="http://yuna.clogic-int.com/~warm/incoming/#Name#" target="about:blank">#Name#</a></td><td>#Size#</td>
</tr>
</cfoutput>
</table>
</cfif>
</center>
</body>
</html>
\ No newline at end of file
-- MySQL dump 10.13 Distrib 5.5.41, for debian-linux-gnu (x86_64)
--
-- Host: localhost Database: fistspa
-- ------------------------------------------------------
-- Server version 5.5.41-0+wheezy1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Current Database: `fistspa`
--
/*!40000 DROP DATABASE IF EXISTS `fistspa`*/;
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `fistspa` /*!40100 DEFAULT CHARACTER SET latin1 */;
USE `fistspa`;
--
-- Table structure for table `downloads`
--
DROP TABLE IF EXISTS `downloads`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `downloads` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`username` varchar(45) NOT NULL DEFAULT '',
`date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`fileid` int(10) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `downloads`
--
LOCK TABLES `downloads` WRITE;
/*!40000 ALTER TABLE `downloads` DISABLE KEYS */;
INSERT INTO `downloads` VALUES (1,'jpw','2017-11-28 10:27:55',3);
/*!40000 ALTER TABLE `downloads` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `uploads`
--
DROP TABLE IF EXISTS `uploads`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `uploads` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`username` varchar(45) NOT NULL DEFAULT '',
`category` varchar(255) NOT NULL DEFAULT '',
`date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`comments` text,
`dlcount` bigint(20) unsigned NOT NULL DEFAULT '0',
`filetoupload` text NOT NULL,
`title` varchar(255) NOT NULL DEFAULT '',
`media` varchar(100) NOT NULL DEFAULT '',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `uploads`
--
LOCK TABLES `uploads` WRITE;
/*!40000 ALTER TABLE `uploads` DISABLE KEYS */;
INSERT INTO `uploads` VALUES (1,'jpw','Any','2015-12-02 15:36:28','',0,'20140626_101349.jpg','Test','Still Picture'),(2,'jpw','Any','2015-12-02 15:55:21','',0,'15s.jpg','Lincoln Town Car','Still Picture'),(3,'jpw','Any','2017-11-28 10:26:46','905 Alamo St. CAD',1,'905 ALAMO ST.zip','Alamo St CAD','Other');
/*!40000 ALTER TABLE `uploads` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `users`
--
DROP TABLE IF EXISTS `users`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `users` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`username` varchar(45) NOT NULL DEFAULT '',
`password` varchar(45) NOT NULL DEFAULT '',
`dlcount` bigint(20) unsigned NOT NULL DEFAULT '0',
`ulcount` bigint(20) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `users`
--
LOCK TABLES `users` WRITE;
/*!40000 ALTER TABLE `users` DISABLE KEYS */;
INSERT INTO `users` VALUES (1,'jpw','tech93',1,3),(2,'pilotsim','poooop',0,0);
/*!40000 ALTER TABLE `users` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2018-03-10 15:04:03
<html>
<head> <title>Upload File</title>
<link href="cld.css" rel="stylesheet" type="text/css">
</head>
<body>
<center>
<br>
<cfquery name="updateStats" datasource="#session.datasource#">
UPDATE users SET ulcount=ulcount+1 WHERE username="#session.username#"
</cfquery>
<cffile action="upload"
destination="/home/chocolatejollis/www/filespa/incoming"
nameConflict="makeunique"
fileField="Form.FiletoUpload">
<table width="400" height="200" border="0">
<tr>
<td align="left" class="sthdr" height="10">Upload Success</td>
</tr>
<tr>
<td align="center" valign="middle">
<cfoutput>
#cffile.ClientFileName#.#cffile.ClientFileExt#
</cfoutput>
<cfquery name="udfile" datasource="#session.datasource#">
INSERT INTO uploads
(username,
category,
date,
comments,
filetoupload,
title,
media)
VALUES
('#form.username#',
'#form.category#',
#form.date#,
'#form.comments#',
'#cffile.serverFile#',
'#form.title#',
'#form.media#')
</cfquery>
</td>
</tr>
</table>
</center>
</body>
</html>
<head><title>Specify File to Upload</title>
<link href="cld.css" rel="stylesheet" type="text/css">
</head>
<body>
<center>
<br>
<br>
<form action="uploadfileaction.cfm"
enctype="multipart/form-data"
method="post">
<table width="400" border="0" class="st">
<tr>
<td colspan="2" align="left" class="sthdr" height="10">UPLOAD FILE</td>
</tr>
<tr>
<td width="399" height="10" align="left" valign="bottom"><strong>File:</strong></td>
<td width="385" align="left" valign="bottom"><div align="right"><input type="file" name="FiletoUpload"></div></td>
</tr>
<tr>
<td colspan="2" align="right" valign="bottom" height="10">
<input type="submit" class="normalButton"
value="Upload">
</td>
</tr>
</table>
</form>
</center>
</body>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment