<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <% ' *** Edit Operations: declare variables Dim MM_editAction Dim MM_abortEdit Dim MM_editQuery Dim MM_editCmd Dim MM_editConnection Dim MM_editTable Dim MM_editRedirectUrl Dim MM_editColumn Dim MM_recordId Dim MM_fieldsStr Dim MM_columnsStr Dim MM_fields Dim MM_columns Dim MM_typeArray Dim MM_formVal Dim MM_delim Dim MM_altVal Dim MM_emptyVal Dim MM_i MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME")) If (Request.QueryString <> "") Then MM_editAction = MM_editAction & "?" & Request.QueryString End If ' boolean to abort record edit MM_abortEdit = false ' query string to execute MM_editQuery = "" %> <% ' *** Insert Record: set variables If (CStr(Request("MM_insert")) = "form2") Then MM_editConnection = MM_bqsm_STRING MM_editTable = "Feedback" MM_editRedirectUrl = "RegSuccess.asp" MM_fieldsStr = "email4|value|name4|value|message4|value|date4|value|IP_add4|value" MM_columnsStr = "SenderEmail|',none,''|FeedbackSender|',none,''|FeedbackDescription|',none,''|FeedbackDateReceive|',none,NULL|FeedbackIP|',none,''" ' create the MM_fields and MM_columns arrays MM_fields = Split(MM_fieldsStr, "|") MM_columns = Split(MM_columnsStr, "|") ' set the form values For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2 MM_fields(MM_i+1) = CStr(Request.Form(MM_fields(MM_i))) Next ' append the query string to the redirect URL If (MM_editRedirectUrl <> "" And Request.QueryString <> "") Then If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0 And Request.QueryString <> "") Then MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString Else MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString End If End If End If %> <% ' *** Insert Record: construct a sql insert statement and execute it Dim MM_tableValues Dim MM_dbValues If (CStr(Request("MM_insert")) <> "") Then ' create the sql insert statement MM_tableValues = "" MM_dbValues = "" For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2 MM_formVal = MM_fields(MM_i+1) MM_typeArray = Split(MM_columns(MM_i+1),",") MM_delim = MM_typeArray(0) If (MM_delim = "none") Then MM_delim = "" MM_altVal = MM_typeArray(1) If (MM_altVal = "none") Then MM_altVal = "" MM_emptyVal = MM_typeArray(2) If (MM_emptyVal = "none") Then MM_emptyVal = "" If (MM_formVal = "") Then MM_formVal = MM_emptyVal Else If (MM_altVal <> "") Then MM_formVal = MM_altVal ElseIf (MM_delim = "'") Then ' escape quotes MM_formVal = "'" & Replace(MM_formVal,"'","''") & "'" Else MM_formVal = MM_delim + MM_formVal + MM_delim End If End If If (MM_i <> LBound(MM_fields)) Then MM_tableValues = MM_tableValues & "," MM_dbValues = MM_dbValues & "," End If MM_tableValues = MM_tableValues & MM_columns(MM_i) MM_dbValues = MM_dbValues & MM_formVal Next MM_editQuery = "insert into " & MM_editTable & " (" & MM_tableValues & ") values (" & MM_dbValues & ")" If (Not MM_abortEdit) Then ' execute the insert Set MM_editCmd = Server.CreateObject("ADODB.Command") MM_editCmd.ActiveConnection = MM_editConnection MM_editCmd.CommandText = MM_editQuery MM_editCmd.Execute MM_editCmd.ActiveConnection.Close ' SEND EMAIL Dim trixMail, trixBody Set trixMail = CreateObject("Persits.MailSender") trixMail.Host="mail.bqsm.gov.my" ' Specify a valid SMTP server trixBody="Hi there, " & request.form ("usernama") & vbcrlf trixBody=trixBody & vbcrlf trixBody=trixBody & "Thank you for applying for BQSM e-membership on " & request.form ("date_now") & vbcrlf trixBody=trixBody & "Please check your mailbox within 24 hours for status of application" & vbcrlf trixBody=trixBody & vbcrlf trixBody=trixBody & "BQSM Webmaster" & vbcrlf trixMail.Username = "admin@bqsm.gov.my" 'Please specify the valid user account here trixMail.Password = "rbk239uv" ' Please specify you actual user password here trixMail.From="info@bqsm.gov.my" trixMail.FromName = "BQSM Secretariat" ' optional trixMail.AddAddress Request.Form("email_add") trixMail.Subject="New Application for BQSM e-membership" trixMail.Body=trixBody trixMail.Send set trixMail=nothing If (MM_editRedirectUrl <> "") Then Response.Redirect(MM_editRedirectUrl) End If End If End If %> <% If cstr(Request.Form("username"))<>"" Then If Request.form("checkbox") ="1" Then Response.Cookies("username") = Request.Form("username") Response.Cookies("password") = Request.Form("password") Response.Cookies("remember") = "1" Response.Cookies("username").expires = Date + 30 Response.Cookies("password").expires = Date + 30 Response.Cookies("remember").expires = Date + 30 Else Response.Cookies("remember") = "" Response.Cookies("username") = "" Response.Cookies("password") = "" End If End If %> <% ' *** Validate request to log in to this site. MM_LoginAction = Request.ServerVariables("URL") If Request.QueryString<>"" Then MM_LoginAction = MM_LoginAction + "?" + Server.HTMLEncode(Request.QueryString) MM_valUsername=CStr(Request.Form("username")) If MM_valUsername <> "" Then MM_fldUserAuthorization="" MM_redirectLoginSuccess="Logintrack.asp" MM_redirectLoginFailed="a1_login.asp?error=1" MM_flag="ADODB.Recordset" set MM_rsUser = Server.CreateObject(MM_flag) MM_rsUser.ActiveConnection = MM_bqsm_STRING MM_rsUser.Source = "SELECT fusername, fpassword, QSIId, QSIQSRegNo, QSIQSName, fpages" If MM_fldUserAuthorization <> "" Then MM_rsUser.Source = MM_rsUser.Source & "," & MM_fldUserAuthorization MM_rsUser.Source = MM_rsUser.Source & " FROM QSIQSIndividual WHERE fusername='" & Replace(MM_valUsername,"'","''") &"' AND fpassword='" & Replace(Request.Form("password"),"'","''") & "'" MM_rsUser.CursorType = 0 MM_rsUser.CursorLocation = 2 MM_rsUser.LockType = 3 MM_rsUser.Open If Not MM_rsUser.EOF Or Not MM_rsUser.BOF Then ' username and password match - this is a valid user Session("MM_Username") = MM_valUsername Session("svUserID") = MM_rsUser.Fields.Item("QSIId").Value Session("SV_Regno") = MM_rsUser.Fields.Item("QSIQSRegNo").Value Session("Svname") = MM_rsUser.Fields.Item("QSIQSName").Value If (MM_fldUserAuthorization <> "") Then Session("MM_UserAuthorization") = CStr(MM_rsUser.Fields.Item(MM_fldUserAuthorization).Value) Else Session("MM_UserAuthorization") = "" End If if CStr(Request.QueryString("accessdenied")) <> "" And false Then MM_redirectLoginSuccess = Request.QueryString("accessdenied") End If MM_rsUser.Close Response.Redirect(MM_redirectLoginSuccess) End If MM_rsUser.Close Response.Redirect(MM_redirectLoginFailed) End If %> <% Dim UsersRS__value UsersRS__value = "zx" if (Request.Form("Email") <> "") then UsersRS__value = Request.Form("Email") %> <% set UsersRS = Server.CreateObject("ADODB.Recordset") UsersRS.ActiveConnection = MM_bqsm_STRING UsersRS.Source = "SELECT QSIQSEmail, fusername, fpassword FROM QSIQSIndividual WHERE QSIQSEmail='" + Replace(UsersRS__value, "'", "''") + "'" UsersRS.CursorType = 0 UsersRS.CursorLocation = 2 UsersRS.LockType = 3 UsersRS.Open() UsersRS_numRows = 0 %> <% if Request.Form("submit") <> "" then if UsersRS.eof and UsersRS.bof then response.redirect "EmailFail.asp" else Dim objmail, mailbody set objmail=CreateObject("Persits.MailSender") objmail.Username = "admin@bqsm.gov.my" 'Please specify the valid user account here objmail.Password = "rbk239uv" ' Please specify you actual user password here objmail.Host="mail.bqsm.gov.my" ' Specify a valid SMTP server objmail.From="admin@bqsm.gov.my" objmail.AddAddress Request.Form("Email") objmail.Subject="Username and Password" mailbody="Here is your username and password:" & vbcrlf mailbody=mailbody & "Username - " & UsersRS("fusername") & vbcrlf mailbody=mailbody & "Password - " & UsersRS("fpassword") & vbcrlf objmail.Body=mailbody objmail.Send set objmail=Nothing response.redirect "EmailSuccess.asp" end if end if %> BQSM l Member Login
  <% MM_authorizedUsers="" MM_grantAccess=false If Session("MM_Username") <> "" Then If (true Or CStr(Session("MM_UserAuthorization"))="") Or _ (InStr(1,MM_authorizedUsers,Session("MM_UserAuthorization"))>=1) Then MM_grantAccess = true End If End If If Not MM_grantAccess Then ' *** Show If User Not Logged In %>
   
       
<% End If ' *** Show If User Not Logged In %><% MM_authorizedUsers="" MM_grantAccess=false If Session("MM_Username") <> "" Then If (true Or CStr(Session("MM_UserAuthorization"))="") Or _ (InStr(1,MM_authorizedUsers,Session("MM_UserAuthorization"))>=1) Then MM_grantAccess = true End If End If If MM_grantAccess Then ' *** Show If User Logged In %>
Hi <%=Session("MM_Username")%>  l   Logout
<% End If ' *** Show If User Logged In %>
 
 
     
 
 
     
 
  myCPD Member Login
 
myCPD allows member to check their CPD record online.
<% If Request.QueryString("error")="1" Then%> Incorrect Username or Password. Please try again! <%Else If Request.QueryString("error")="2" Then%> Please Login to view page <%Else If Request.QueryString("error")="3" Then%> Sorry this user is already logged in or you didn't logout on your last session. Logout here. <%Else %> Please enter your username and password <%End If%> <%End If%> <%End If%>
Username    
" size="15" maxlength="15">
Password    
" type="password" name="password" class="dxplayv3" onFocus="if(this.value=='password')this.value=''" onBlur="if(this.value=='')this.value='password'" size="15">       type="checkbox" name="checkbox" value="1"> remember me!
 

   
   
 
 
 
 
<% UsersRS.Close() Set UsersRS = Nothing %>