Harap posting sesuai dengan Kategorinya agar anggota yang lain mudah dalam bernavigasi!
0 Members and 1 Guest are viewing this topic.
SELECT 1USE '\alumni\table\data_user.dbf' SHARED INDEX '\alumni\table\data_user.cdx'SET ORDER TO tag useridxSELECT 2USE '\alumni\table\user_aktif.DBF' SHARED
local lcuserid,lcpasswordlcuserid =ALLTRIM(thisform.txtuser.value)lcpassword =ALLTRIM(thisform.txtpassword.value)*!* cek apakau user mengisi user id dan pwdIF empty(thisform.txtuser.value) ?? chr(7) wait window nowait 'User ID tidak boleh kosong!' thisform.txtuser.setfocus RETURN ENDIF IF empty(thisform.txtpassword.value) ?? chr(7) wait window nowait 'Password tidak boleh kosong!' thisform.txtpassword.setfocus RETURN ENDIFSELECT 2IF user_aktif.userx = ALLTRIM(thisform.txtuser.Value) MESSAGEBOX("Username Anda sedang digunakan...!",64,"Warning") Thisform.txtuser.SetFocus RETURNEndif*!* cek apakah password cocokSELECT 1SEEK lcuserid IF FOUND() temp_user = data_user.user temp_nama = data_user.nama temp_waktu = DATETIME() IF data_user.password = lcpassword _userlvl = data_user.status SELECT 2 APPEND BLANK replace user_aktif.userx WITH ALLTRIM(thisform.txtuser.Value) replace user_aktif.namax WITH temp_nama replace user_aktif.time_entry WITH temp_waktu thisform.Release() MESSAGEBOX("Selamat Datang, "+ ALLTRIM(temp_nama)+"...!",64,"Konfirmasi") CLEAR EVENTS SET SYSMENU on ELSE tanya = MESSAGEBOX("Password Anda Salah..!",64,"Konfirmasi") Thisform.txtpassword.SetFocus ENDIF ELSE tanya = MESSAGEBOX("Nama User Anda Salah....!",64,"Konfirmasi") Thisform.txtuser.SetFocus ENDIF