Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <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>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement