Approved Users
" else if actionTaken="unapproved" then sqlQuery ="select * from tbl_IEEE_User u, tbl_IEEE_school s where u.USSCID = s.SCID and u.USID not in " sqlQuery= sqlQuery & "(select AUUSID from tbl_IEEE_approved_user) order by s.SCNAME, u.USLNAME" set RSdata = conn.execute(sqlQuery) Response.Write "Unapproved Users
" else if actionTaken="approveUser" then userToBeUpdated = cint(Request.Form("userToBeUpdated")) sqlQuery ="insert into tbl_IEEE_approved_user(AUUSID,AUADMIN) values ("&userToBeUpdated&",0)" conn.execute(sqlQuery) ' **** GET THE ADMIN MAIL and password and send email to the approved user sqlQuery = "select * from variable_table where description = 'admin_mail'" set RSBuffer= conn.Execute(sqlquery) if RSBuffer.EOF = false then adminMail = trim(RSBuffer("value")) end if sqlQuery = "select * from tbl_IEEE_user where USID="&userToBeUpdated set RSbuffer = conn.execute(sqlQuery) userMail = trim(RSbuffer("USEMAIL")) userUname = trim(RSbuffer("USUSERNAME")) userPassword = trim(RSbuffer("USPASSWORD")) 'Response.Write adminMail & "Unapproved Users
" else if actionTaken="disapproveUser" then userToBeUpdated = cint(Request.Form("userToBeUpdated")) sqlQuery ="delete from tbl_IEEE_approved_user where AUUSID="&userToBeUpdated conn.execute(sqlQuery) 'show approved users sqlQuery = "select * from tbl_IEEE_User u, tbl_IEEE_School s" sqlQuery = sqlQuery & " where u.USSCID = s.SCID and u.USID in " sqlQuery= sqlQuery & "(select AUUSID from tbl_IEEE_approved_user) order by s.SCNAME,u.USLNAME" set RSdata = conn.execute(sqlQuery) Response.Write "Approved Users
" else if actionTaken="deleteUser" then userToBeUpdated = cint(Request.Form("userToBeUpdated")) sqlQuery = "Select * from tbl_IEEE_report where REUSID="&userToBeUpdated set RSbuffer = conn.execute(sqlQuery) if RSbuffer.eof= false then 'if the user has filled out the report Response.Write "Error: The user has already filled a report." else 'the user has not filled a report sqlQuery ="delete from tbl_IEEE_approved_user where AUUSID="&userToBeUpdated conn.execute(sqlQuery) sqlQuery = "delete from tbl_IEEE_user where USID="&userToBeUpdated conn.execute(sqlQuery) end if 'show unapproved users sqlQuery ="select * from tbl_IEEE_User u, tbl_IEEE_school s where u.USSCID = s.SCID and u.USID not in " sqlQuery= sqlQuery & "(select AUUSID from tbl_IEEE_approved_user) order by s.SCNAME,u.USLNAME" set RSdata = conn.execute(sqlQuery) Response.Write "Unapproved Users
" end if end if end if end if end if 'Response.Write "actionTaken:"&actionTaken&"| <% if actionTaken="unapproved" or actionTaken="approveUser" or actionTaken="deleteUser" then %> <%else if actionTaken = "approved" or actionTaken ="disapproveUser" then %> <% end if end if %> | |||||
| No. | Name | School | Detail | Approve/Disapprove | Survey Submitted? |
| <%=number%> | <% Response.write trim(RSdata("USFNAME"))&" " Response.write trim(RSdata("USMNAME"))&" " Response.write trim(RSdata("USLNAME")) %> | <%=trim(RSdata("SCNAME"))%> | '" style="FONT-WEIGHT: bold; BORDER-LEFT-COLOR: chocolate; BORDER-BOTTOM-COLOR: chocolate; CURSOR: hand; BORDER-TOP-STYLE: solid; BORDER-TOP-COLOR: chocolate; FONT-FAMILY: ; BORDER-RIGHT-STYLE: solid; BORDER-LEFT-STYLE: solid; BACKGROUND-COLOR: sandybrown; BORDER-RIGHT-COLOR: chocolate; BORDER-BOTTOM-STYLE: solid" width=100> | <% if actionTaken = "approved" or actionTaken ="disapproveUser" then %> '" style="FONT-WEIGHT: bold; BORDER-LEFT-COLOR: chocolate; BORDER-BOTTOM-COLOR: chocolate; CURSOR: hand; BORDER-TOP-STYLE: solid; BORDER-TOP-COLOR: chocolate; FONT-FAMILY: ; BORDER-RIGHT-STYLE: solid; BORDER-LEFT-STYLE: solid; BACKGROUND-COLOR: sandybrown; BORDER-RIGHT-COLOR: chocolate; BORDER-BOTTOM-STYLE: solid" width=100> <% else if actionTaken="unapproved" or actionTaken="approveUser" or actionTaken="deleteUser" then %> '" style="FONT-WEIGHT: bold; BORDER-LEFT-COLOR: chocolate; BORDER-BOTTOM-COLOR: chocolate; CURSOR: hand; BORDER-TOP-STYLE: solid; BORDER-TOP-COLOR: chocolate; FONT-FAMILY: ; BORDER-RIGHT-STYLE: solid; BORDER-LEFT-STYLE: solid; BACKGROUND-COLOR: sandybrown; BORDER-RIGHT-COLOR: chocolate; BORDER-BOTTOM-STYLE: solid" width=100> <% end if end if %> | <%if actionTaken = "approved" or actionTaken ="disapproveUser" then sqlQuery = "select REFINISH from tbl_IEEE_report where REUSID="&cint(RSdata("USID")) set RSData2 = conn.execute(sqlQuery) if RSData2.eof = false then if RSdata2("REFINISH")= true then Response.Write "X" else Response.Write " " end if end if end if %> |