Password

Menu ganti password teryata sangat diperlukan bagi user , hal ini diperlukan supaya para user punya kenyamanan atas password yang dibikin
Menu pengantian pasword yg saya upload belum saya enkripsi dan smoga bermanfaat

Screen Shoot

This is my coding with minigui extended

#include “minigui.ch”

procedure passw

set delete on
set century on
set navigation extended
set date italia

if !iswindowactive (pk)

Define window pk ;
at 150,100 ;
width 650 ;
height 400 ;
icon ‘c:\soalgui\demo.ico’;
title “Menu Pergantian password” ;
modal nosize;
NOSYSMENU

ON KEY ESCAPE ACTION ThisWindow.Release

DEFINE IMAGE SHEET3
ROW 0
COL 0
WIDTH 640
HEIGHT 120
PICTURE ‘x:\SOALGUI\DASAR\MINIGUI.GIF’
END IMAGE

DRAW PANEL ;
IN WINDOW PK ;
AT 135,35 ;
TO 300,620

@ 320,210 label jdl_lbl value ” Menu pergantian password ” ;
font “arial” size 15 ;
fontcolor { 197,20,197 };
width 280 ;
transparent blink;
height 100

@ 160,60 label suser_lbl value ” Masukan Nama Anda ” ;
font ” arial” size 12;
WIDTH 300;
BOLD

@ 190, 60 label spasslama_lbl value ” Masukan Password Lama anda “;
font ” arial” size 12;
width 300 ;
BOLD

@ 220, 60 label spassbaru_lbl value ” Masukan Password baru anda “;
font ” arial” size 12 ;
width 300;
BOLD

@ 250, 60 label spassbaru2_lbl value ” Masukan kembali password baru anda”;
width 300 ;
font ” arial” size 12;
BOLD

@ 160,400 textbox suser_txt font “arial” size 12 ;
width 200 ;
maxlength 10 ;
UPPERCASE ;
ON LOSTFOCUS USERCEK()
// on enter { usercek() }

@ 190,400 textbox spasslama_txt font “arial” size 12;
width 200 ;
maxlength 10 ;
password ;
ON ENTER { passwcek() }

@ 220,400 textbox spassbaru_txt font “arial” size 12 ;
width 200 ;
maxlength 10 ;
password ;
on enter pass1()

@ 250,400 textbox spassbaru2_txt font “arial” size 12;
width 200 ;
maxlength 10 ;
password ;
ON ENTER passdua()

END WINDOW

center window pK

ACTIVATE WINDOW pk

Endif

RETURN

Static function usercek

cUser := pk.suser_txt.value

select password
dbseek(cUser)
if empty(cUser)
msginfo(“User Tidak boleh Kosong”,”Konfirmasi User Kosong”)
pk.suser_txt.setfocus
Return
else
pk.spasslama_txt.setfocus
endif

if cuser == alltrim(user)

if found()
pk.spasslama_txt.setfocus
else
msginfo(” Nama anda Tak tercantum dalam database “)
pk.suser_txt.setfocus
endif
else

msginfo(” Nama anda Tak tercantum dalam database “)
pk.suser_txt.setfocus

endif

RETURN cUser

Static Function passwcek

LOCAL cUser := alltrim(pk.suser_txt.value)
Local cPassw := pk.spasslama_txt.value
LOCAL cCARI := (cUser+cPassw)

select password
if empty(cPassw)
msginfo(“password Tidak boleh Kosong”,”Konfirmasi password Kosong”)
pk.spasslama_txt.setfocus
Return
Endif

IF cpassw == ALLTRIM(pass)

dbseek(cCari)
if .NOT.FOUND()
msginfo(“password anda salah”,”Konfirmasi salah”)
pk.spasslama_txt.setfocus
else
pk.spassbaru_txt.setfocus
endif
else
msginfo(“password anda salah”,”Konfirmasi salah”)
pk.spasslama_txt.setfocus
return
endif

return cCari

static function pass1

if empty(pk.spassbaru_txt.value)
msginfo(“password Tidak boleh Kosong”,”Konfirmasi password Kosong”)
pk.spassbaru_txt.setfocus
Return
Endif

Return

static function passdua

if empty(pk.spassbaru2_txt.value)
msginfo(“password Tidak boleh Kosong”,”Konfirmasi password Kosong”)
pk.spassbaru2_txt.setfocus
Return
Endif

If alltrim(pk.spassbaru_txt.value) == alltrim(pk.spassbaru2_txt.value)

select password
RRLOCK()
REPLACE USERclient WITH PK.SUSER_TXT.VALUE
REPLACE PASSclient WITH PK.SPASSBARU_TXT.VALUE
dbcommit()
dbunlock()

msginfo(“Anda sukses untuk menganti password”,”Konfirmasi ganti password sukse”)
release window pk

else
msginfo(“Paswword anda tidak sama”,”Konfirmasi password salah”)
pk.spassbaru2_txt.setfocus
return

Endif

Return

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s

%d blogger menyukai ini: