Skip to content

Instantly share code, notes, and snippets.

Created July 10, 2016 01:36

Revisions

  1. @invalid-email-address Anonymous created this gist Jul 10, 2016.
    65 changes: 65 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,65 @@
    <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>