Created
July 10, 2016 01:36
-
-
Save anonymous/2f65ffc69fec954555a7ec759b715836 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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