Advertisement
Guest User

Untitled

a guest
Jul 9th, 2016
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. <cfscript>
  2. function is_authorized(username, password) {
  3. if(username == "admin" && password == "password"){
  4. return 1;
  5. }
  6. else
  7. return 0;
  8. }
  9. </cfscript>
  10.  
  11. <cfscript>
  12. function deleteRecord() {
  13.  
  14. }
  15. </cfscript>
  16.  
  17. <cfscript>
  18. function updateRecord() {
  19.  
  20. }
  21. </cfscript>
  22.  
  23. <cfscript>
  24. function createRecord() {
  25.  
  26. }
  27. </cfscript>
  28.  
  29. <html>
  30. <head>
  31. </head>
  32. <body>
  33. <table>
  34. <tr>
  35. <th>ID</th>
  36. <th>First</th>
  37. <th>Last</th>
  38. <th>Location</th>
  39. </tr>
  40.  
  41. <cfif (is_authorized("admin", "password"))>
  42. <cfquery name="showAll" datasource="accounts">
  43. SELECT * FROM proctors
  44. </cfquery>
  45.  
  46. <cfoutput query="showall">
  47. <tr>
  48. <td>#id#</td> <td>#firstname#</td> <td>#lastname#</td>
  49. <td><select>
  50. <option value="Seattle">Seattle</option>
  51. <option value="New York">New York</option>
  52. </select></td>
  53. <td>Delete</td>
  54. <td>Update</td>
  55.  
  56. </tr>
  57. </cfoutput>
  58.  
  59. </cfif>
  60.  
  61. </table>
  62. New Record
  63. </body>
  64. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement