Skip to content

Instantly share code, notes, and snippets.

Created July 10, 2016 01:36
Show Gist options
  • Save anonymous/2f65ffc69fec954555a7ec759b715836 to your computer and use it in GitHub Desktop.
Save anonymous/2f65ffc69fec954555a7ec759b715836 to your computer and use it in GitHub Desktop.
<cfscript>
function is_authorized(username, password) {
if(username == "admin" && password == "password"){
return 1;
}
else
return 0;
}
</cfscript>
<cfscript>
function deleteRecord() {
}
</cfscript>
<cfscript>
function updateRecord() {
}
</cfscript>
<cfscript>
function createRecord() {
}
</cfscript>
<html>
<head>
</head>
<body>
<table>
<tr>
<th>ID</th>
<th>First</th>
<th>Last</th>
<th>Location</th>
</tr>
<cfif (is_authorized("admin", "password"))>
<cfquery name="showAll" datasource="accounts">
SELECT * FROM proctors
</cfquery>
<cfoutput query="showall">
<tr>
<td>#id#</td> <td>#firstname#</td> <td>#lastname#</td>
<td><select>
<option value="Seattle">Seattle</option>
<option value="New York">New York</option>
</select></td>
<td>Delete</td>
<td>Update</td>
</tr>
</cfoutput>
</cfif>
</table>
New Record
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment