Chương trình quản lý đào tạo Trường Đại học Thủy sản

Phần mềm “Chương trình quản lý đào tạo Trường Đại học Thủy sản” hoạt động ở môi trường Windows 98, Windows 2000, WindowsXP với ngôn ngữ Visual FoxPro 7.0 for Windows đang được sử dụng tại Trường Đại học Thủy sản và tiếp tục phát triển, hoàn chỉnh từng phần. Chương trình sử dụng hiệu quả trên mạng cục bộ (Mạng ngang hàng, Mạng Netware, Mạng Windows NT, Mạng Windows 2000 ), phân quyền rõ ràng cho các cá nhân sử dụng phải kết hợp người quản trị mạng nội bộ (Supervisor) và quản trị viên của hệ thống quản lý nhằm nâng cao tính an toàn, tin cậy cho dữ liệu.

doc21 trang | Chia sẻ: vietpd | Lượt xem: 1458 | Lượt tải: 0download
Bạn đang xem trước 20 trang tài liệu Chương trình quản lý đào tạo Trường Đại học Thủy sản, để xem tài liệu hoàn chỉnh bạn click vào nút DOWNLOAD ở trên
Kết luận Phần mềm “Chương trình quản lý đào tạo Trường Đại học Thủy sản” hoạt động ở môi trường Windows 98, Windows 2000, WindowsXP với ngôn ngữ Visual FoxPro 7.0 for Windows đang được sử dụng tại Trường Đại học Thủy sản và tiếp tục phát triển, hoàn chỉnh từng phần. Chương trình sử dụng hiệu quả trên mạng cục bộ (Mạng ngang hàng, Mạng Netware, Mạng Windows NT, Mạng Windows 2000…), phân quyền rõ ràng cho các cá nhân sử dụng phải kết hợp người quản trị mạng nội bộ (Supervisor) và quản trị viên của hệ thống quản lý nhằm nâng cao tính an toàn, tin cậy cho dữ liệu. Về hướng lâu dài dữ liệu cần phải liên kết chạy trên môi trường WEB, mục đích đưa thông tin (Ví dụ: Điểm thi, Thời khóa biểu, học bổng, học phí v.v...) và trao đổi thông tin trực tuyến một số các vấn đề khả thi (Ví dụ: Đăng ký môn học, đăng ký coi thi, SV nộp đơn cho nhà trường, v.v...). Vì trình độ, kinh nghiệm thực tế và thời gian có hạn nên việc thực hiện chương trình gặp rất nhiều khó khăn, chương trình chắc chắn còn rất nhiều thiếu sót, rất mong nhận được sự chỉ bảo, góp ý của các Thầy, các bạn đồng nghiệp và những người có quan tâm đến vấn đề này. Một lần nữa tôi xin chân thành cám ơn Thầy Thạc sỹ Đỗ Như An, Thạc sỹ Võ Tấn Quân (ĐKBK Tp. Hồ Chí Minh), Phòng Đào tạo Trường Đại học Thủy sản, Khoa Công nghệ Thông tin Trường Đại học Thủy sản, Trường Đại học Bách khoa Hà Nội. Tôi cũng xin cám ơn các bạn trong lớp TIN99 đã giúp đỡ, động viên, tạo mọi điều kiện để Đồ án tốt nghiệp được hoàn thành. Tôi xin bày tỏ lòng biết ơn sâu sắc về những sự giúp đỡ quý báu đó. Phụ lục Một số chương trình tiêu biểu 1) Chương trình vào tiện ích quản trị hệ thống : Hutils.prg para mformmtest, mformmenu SET TALK OFF SET SAFE OFF save all like mformm* to usermem0 #include hheader.h CLOSE DATA DEAC WIND ALL CLEAR WIND ALL ON ERROR SET DELE ON ACTIVATE SCREEN CLEAR PUBLIC hmain, hwait, hintbao1, hxuly, hmessbox, hsetpr qpathhtql = LEFT(SYS(16),RAT('\',SYS(16),2)-1)+'\htql' qpathsys_ = LEFT(SYS(16),RAT('\',SYS(16),3)-1)+'\sys' SET PROC TO (qpathhtql+'\hprocw') REST FROM (qpathsys_+'\hcompany') ADDI REST FROM (qpathsys_+'\hreport') ADDI rest from usermem0 addi qletter ='H' =hPrepPath(mformmtest) =HideToolbar() if !hPrepUser() return endif if !(ALLTRIM(quser)=='HTQL') =hmessbox('Tiện ích này chỉ cho phép sử dụng bởi user HTQL') quit return endif if !(hdelslash(uppe(allt(qdir)))==hdelslash(uppe(allt(qpathhtql)))) =hmessbox('Thư mục làm việc không hợp lệ') quit endif DO form (qpathform+'\hutils') =ShowToolbar() =hreset() RETURN ************* proc hreset ************* ON KEY SET SAFE ON SET SYSM ON SET HELP ON ACTI SCREEN CLEAR RETURN 2) Thủ tục login (nhập password trước khi vào hệ thống) : inputpa.prg para mreaduser priv mrightpas, mfuser, mloginok, mloi, mfirsttime push key do hsetonkey qdir=hdelslash(sys(5)+curd()) mthumucql= (hdelslash(uppe(allt(qdir)))==hdelslash(uppe(allt(qpathhtql)))) if !mthumucql and ALLTRIM(quser)=='HTQL' quser=space(8) endif =hmofile('gusers') if !htagexist('f_login') do hsavecdx endif close data =hmofile('gusers') set order to f_login if empty(quser) quserff=hdelslash(padr(upper(subs(curd(),rat('\',curd(),2)+1)),8)) loca all for f_login=quserff if found() quser=quserff endif endif =hmofile('uusers',0,0,0,'f_login') mrightpas='' sele gusers loca all for f_login=padr(quser,len(f_login)) mfuser=found() qnumid=f_iduser qadmin=f_adminis qpass_user=f_password qtenuser=f_username if !empty(mreaduser) use in gusers use in uusers pop key return endif muuser=seek(padr(quser,len(uusers.f_login)),'uusers') if muuser =hmessbox('Mật khẩu User đã đổi chưa có hiệu lực'+CHR(13)+'=> Sử dụng mật khẩu cũ') endif mloi=0 msetnoti=set('noti') set notify off do while .y. qerror="" qcontrol="" mkqua=0 quser=padr(quser,len(gusers.f_login)) cps=SPACE(12) do form (qpathform+'\hpasswd') if EMPTY(mkqua) OR EMPTY(quser) qerror="UserExit" exit endif sele gusers loca all for f_login=padr(quser,len(f_login)) mfuser=found() IF mfuser qnumid=f_iduser qadmin=f_adminis qpass_user=f_password qtenuser=f_username q_cmdlevel=f_cmdlevel m_thuc=hun_real(qpass_user) mckok = (upper(allt(cps))==upper(allt(m_thuc))) or (h_real(cps)==qpassover) if mckok if type('p_user')'C' or !(p_user==quser) p_user=quser save all like p* to hthtin endif exit else if !empty(cps) =hmessbox('Mật khẩu sai','!') endif mloi=mloi+1 ENDIF ELSE ** User name not found =hmessbox('Tên User Không Tìm Thấy','!') mloi=mloi+1 endif if mloi=3 quit endif enddo set noti &msetnoti if !empty(qerror) return .f. endif if (ALLTRIM(quser)=='HTQL') ** Kiem Tra Dung La Thu Muc He Thong Quan Ly if !(hdelslash(uppe(allt(qdir)))==hdelslash(uppe(allt(qpathhtql)))) =hmessbox('Thư mục làm việc không hợp lệ','!') quit ENDIF q_cmdlevel=3 endif if !empty(qerror) if empty(qdir) =hmessbox('Chưa có thư mục làm việc'+CHR(13)+'=> Liên hệ với người quản trị','!') return .f. endif endif use in gusers use in uusers pop key if empty(qerror) if quserp_user p_user=quser save all like p* to hthtin endif endif return empty(qerror) 3) Đổi từ chuỗi thực sang chuỗi mã hóa : Function h_real (hprocw.prg) *************** PROC h_real *************** PARA m_thuc PRIV i_p m_thuc1=PADR(m_thuc,12) m_gia='' FOR i_p=1 TO 12 m_gia=m_gia+CHR(MOD(ASC(SUBS(m_thuc1,i_p,1))-i_p+128,256)) NEXT RETURN m_gia 4) Đổi từ chuỗi mã hóa sang chuỗi thực : Function hun_real (hprocw.prg) ****************** PROC hun_real ****************** ** Mã hoá Password PARA m_gia PRIV i_p m_thuc='' FOR i_p=1 TO 12 m_thuc=m_thuc+CHR(MOD(ASC(SUBS(m_gia,i_p,1))+i_p+128,256)) NEXT RETURN m_thuc 5) Đổi password : Function hchange (hprocw.prg) ***************** PROC hchange ***************** PARA monlycheck, m_messchg, mpwd mloi=0 msetnoti=SET('noti') SET NOTIFY OFF ** Tra loi Mat Khau Cu qpasspwdpub = mpwd DO WHILE .Y. qerror="" qcontrol="" qcancel=.F. DO FORM (qpathform+'\htesspas') WITH m_messchg IF qcancel qerror="UserExit" EXIT ENDIF IF mloi=3 qerror="UserExit" EXIT ENDIF IF !EMPTY(qerror) LOOP ENDIF EXIT ENDDO SET NOTIFY &msetnoti IF !EMPTY(qerror) ** Khong Doi RETURN .F. ENDIF IF EMPTY(monlycheck) ** Nhap & Lap Lai Mat Khau Moi mdem=1 DO WHILE .Y. mkqua=.F. m_pass1=SPACE(12) m_pass2=SPACE(12) DO FORM (qpathform+'\hchange') IF EMPTY(mkqua) RETURN .F. ENDIF m_pass1=upper(m_pass1) m_pass2=upper(m_pass2) IF ((EMPTY(m_pass1) OR EMPTY(m_pass2)) AND m_pass1m_pass2) =hmessbox('Mật khẩu không đổi') RETURN .F. ENDIF IF ALLT(m_pass1)==ALLT(m_pass2) mpasstest_=ALLTRIM(m_pass1) IF !EMPTY(mpasstest_) FOR itest = 1 TO LEN(mpasstest_) msubs=SUBSTR(mpasstest_, itest, 1) IF !(BETWEEN(msubs,'A','Z') OR BETWEEN(msubs,'0','9') OR msubs='_') =hmessbox('Mật Khẩu Chứa Ký Tự Không Hợp Lệ','x') RETURN .f. ENDIF NEXT ENDIF m_pass1=LEFT(ALLT(m_pass1)+SPACE(12),12) mpwd=h_real(m_pass1) =hmofile('gusers',0,0,0,'f_login') mghidirec=hwritedir(qpathdef+'\chng') IF !mghidirec =hmofile('uusers',0,0,0,'f_login') ENDIF SEEK PADR(quser,LEN(f_login)) IF !FOUND() AND !mghidirec APPE BLAN REPL f_login WITH quser ENDIF REPL f_password WITH mpwd USE IN gusers IF !mghidirec USE IN uusers =hmessbox('Mật khẩu đã đổi xong. Sẽ hiệu lực vào ngày hôm sau') ELSE =hmessbox('Mật khẩu đã đổi xong') qpass_user=mpwd ENDIF RETURN .T. ELSE mdem=mdem+1 IF mdem=3 =hmessbox('Mật khẩu không đổi') RETURN .F. ENDIF ENDIF ENDDO ELSE RETURN .T. ENDIF RETURN 6) Kiểm tra password thao tác trực tiếp với chương trình: Function hktpasword (hprocw.prg) ********************** PROC hktpassword ********************** PARA mpwd, mpasshtql IF !EMPTY(mpasshtql) mselepass=SELE() =hmofile('gusers') LOCA ALL FOR ALLT(f_login)=='HTQL' SELE gusers mpwd=f_password USE SELE (mselepass) ELSE IF EMPTY(mpwd) mpwd=qpass_user ENDIF ENDIF mtesttrue=hchange(1, '', mpwd) RETURN mtesttrue 7) Kiểm tra quyền tất cả các phân hệ : Procedure hcheckright (hprocw.prg) ********************* PROC hcheckright ********************* PRIV miq IF TYPE('qletter')='C' AND UPPER(qletter)='L' ** Phan he PVLD khong xet quyen RETURN ENDIF quyenqlph=hquyenph() * Xet Tat Ca Cac Quyen Cua He Thong Khac FOR miq=1 TO LEN(qwordrep)/5 mhthg=RTRIM(SUBS(qwordrep,1+5*(miq-1),5)) qyn&mhthg=hquyen(mhthg) NEXT RETURN 8) Xét tình trạng khóa sổ của 1 phân hệ ở 1 học kỳ : Function HISLOCK (hprocw.prg) **************** PROC hislock **************** PARA mtenph, mnhhklk mselelk=SELE() IF !USED('lockph') =hmofiles('lockph',0,0,0,'f_nhhk','CHNG','glockph') ENDIF SELE lockph SET ORDER TO f_nhhk SEEK IIF(EMPTY(mnhhklk),pnhhk,mnhhklk)+ALLT(mtenph) mlkph=(!EMPTY(lockph.f_lock)) SELE (mselelk) RETURN mlkph 9) Kiểm tra quyền ghi trên thư mục làm việc : Function HKTUSERDIR (hprocw.prg) ******************* PROC hktuserdir ******************* PRIV mtest,mpathmod, mghi, mm, mfilegia mpathmod=hdelslash(SYS(5)+CURD()) ** Kiểm tra quyền ghi trên thư mục mfilegia=hdelslash(ALLT(mpathmod))+'\quser.log' mghi=.T. IF hmyFILE(mfilegia) mm = FOPEN(mfilegia,12) ELSE mm = FCREATE(mfilegia) ENDIF IF mm < 0 mghi=.F. ENDIF IF !mghi =hmessbox('Thư mục làm việc đang có người dùng khác sử dụng '+CHR(13)+'(hoặc không hợp lệ)','x') QUIT ENDIF RETURN 10) Quyền của user đang khai thác chương trình trên 1 phân hệ : Function HQUYEN (HPROCW.prg) **************** FUNC hquyen **************** PARA mph, mgetnum PRIV mph1, mdkqyn IF ALLT(quser)=='HTQL' RETURN .T. ENDIF IF !EMPTY(mgetnum) mdkqyn='f_quyen>=2' ELSE mdkqyn='f_quyen=3' ENDIF IF EMPTY(mph) mph1=qhethong ELSE mph1=mph ENDIF mseleqyn=SELE() =hmofile('gquyen',0,0,0,'f_idph') SEEK STR(qnumid)+mph1 mquyenrt=FOUND() AND &mdkqyn IF !mquyenrt =hmofile('ggroups',0,0,0,'f_iduser') SEEK qnumid SCAN REST WHILE f_iduser=qnumid qgnumid=f_idgroup SELE gquyen SEEK STR(qgnumid)+mph1 mquyenrt=FOUND() AND &mdkqyn IF mquyenrt EXIT ENDIF ENDSCAN USE IN ggroups ENDIF USE IN gquyen SELE (mseleqyn) RETURN mquyenrt 11) Quyền quản lý phân hệ (phân hệ dựa theo biến public qhethong) : Function HQUYENPH (HPROCW.prg) ******************* PROC hquyenph ******************* PARAMETERS mhtpara PRIV mquyenph, mseleqynph mseleqynph=SELE() IF EMPTY(mhtpara) mhtpara1=qhethong ELSE mhtpara1=mhtpara ENDIF =hmofile('quyenph',0,0,0,'f_user') SEEK PADR(quser,LEN(f_user)) IF UPPER(mhtpara1) $ UPPER(qwordrep) mquyenph=!EMPTY(&mhtpara1) OR ALLT(quser)=='HTQL' ELSE mquyenph=.T. ENDIF USE SELE (mseleqynph) RETURN mquyenph 12) Trả về tên user của lần login trước (nếu có) : Function HUSERNAME (HPROCW.prg) ******************** FUNC husername ******************** IF TYPE('p_user')='C' mmuser=PADR(p_user,8) ELSE mmuser=SPACE(8) ENDIF RETURN mmuser 13) Tạo user/group, gán thành viên cho group qua thao tác trực tiếp với chương trình : HQYNSD.prg para mugrp, mnoright vCheck=.f. push key mtxt="" do hsetonkey do hmofile with 'gusers',0,0,0,'f_login' if mugrp=1 &&Them Nguoi Su Dung set filt to empty(f_groupis) else set filt to !empty(f_groupis) endif GO top do hinput with 'hqynsdIp' pop key **************** proc hqynsdIp **************** vOrdF5=2 vOrdF2=1 vOrdCtrlT=3 on key label F5 do hthem with mugrp on key label Ctrl+T do hbot with mugrp on key label F2 do hxemuser with mugrp vOrderList= ' f_login ' vSortFunc='*TRV \<1 Tự Nhiên;\<2 Tên Login' vListC='F_LOGIN' if mugrp=1 mtxt='User' vTipF5="Thêm User" vTipCtrlT="Bớt User" vTipF2="Sửa" vTipCtrlM="Mật Khẩu" vOrdCtrlM=4 on key label Ctrl+M do hpassword with 1 vBmpCtrlM="CtrlMPas" if empty(mnoright) on key label Ctrl+U do hgroups vTipCtrlU="Group" vOrdCtrlU=5 vBmpCtrlU="CtrlUGrp" endif vFieldBrow="fiel f_login:H='Tên Login',f_username:H='Tên đầy đủ',f_adminis:H='Quản Trị':P='@Z',f_cmdlevel:P='@Z' NOMO NOAPP NODELE" else mtxt='Group' vFieldBrow="field f_login:H='Group',f_username:H='Tên Group' NOMO NOAPP NODELE" on key label Ctrl+U do hmember vTipF5="Thêm Group" vTipCtrlT="Bớt Group" vTipF2="Sửa" vTipCtrlU="User" vOrdCtrlU=4 vBmpCtrlU="CtrlUGrp" endif vContentFile="Danh sách "+mtxt return ************* proc hthem ************* para mugrp mfilt=set('filt') set filt to push key do hsetonkey mreccus=recn() go bott if !eof() skip endif mf_password=h_real(space(12)) mf_login=f_login mf_username=f_username mf_adminis=f_adminis mf_cmdlevel=f_cmdlevel matkhau='' if hinputuser(1,mugrp) appen blan mid=hregister('gusers') repl f_iduser with mid, f_groupis with iif(mugrp=1,0,1) repl f_password with mf_password repl f_login with mf_Login repl f_username with mf_username repl f_adminis with mf_adminis repl f_cmdlevel with mf_cmdlevel else do hreturnrec with mreccus endif pop key set filt to &mfilt return *************** proc hgroups *************** PUSH KEY DO hsetonkey mfilt=set('filt') set filt to midusermem=gusers.f_iduser ** ID của user mrecuser=recn() musername=f_login ** User tham gia may group count all for !empty(f_groupis) to mslgp if mslgp=0 =hmessbox("Chưa Có Group Được Tạo !",'!') go mrecuser set filt to &mfilt POP key return endif do hmofile with 'ggroups',0,0,0,'f_iduser' seek midusermem copy rest while f_iduser=midusermem to tam_03 sele 0 use tam_03 repl all f_iduser with f_idgroup sele tam_03.f_iduser, f_login, f_username from tam_03, gusers where tam_03.f_iduser=gusers.f_iduser into dbf tam_01 ** Cac group ma user da tham gia sele f_iduser, f_login, f_username from gusers where ; !empty(f_groupis) and gusers.f_iduser not in (sele tam_03.f_iduser from tam_03) into dbf tam_02 ** Cac group ma user chua tham gia mmcol=2 ***Source sele tam_01 mmRowSource=recc() copy all to array arraySource field f_login, f_username ***Select sele tam_02 mmRowSelect=recc() copy all to array arraySelect field f_login, f_username if type('arraySource')='U' dime arraySource(1,2) endif if type('arraySelect')='U' dime arraySelect(1,2) endif mtxt1="Nhóm User "+ allt(musername)+" Đã Tham Gia" mtxt2="Nhóm User "+ allt(musername)+" Chưa Tham Gia" mkqua=0 do FORM (qpathform+'\hMoveUG') with mtxt1, mtxt2, 'Danh Sách Các Nhóm Mà User Tham Gia' if !EMPTY(mkqua) &&!quscancel sele tam_01 dele all use dbf() excl pack if !empty(arraySource(1,1)) appe from array arraySource field f_login, f_username endif sele gusers moldorder=order() set order to f_login sele tam_01 set relation to f_login into gusers repl all f_iduser with gusers.f_iduser sele tam_02 dele all use dbf() excl pack if !empty(arraySelect(1,1)) appe from array arraySelect field f_login, f_username endif set relation to f_login into gusers repl all f_iduser with gusers.f_iduser do hgankquser sele gusers set order to &moldorder endif release arraySource,arraySelect do hdeletam sele gusers go mrecuser pop key set filt to &mfilt return **************** proc hdeletam **************** if used('tam_01') use in tam_01 endif if used('tam_02') use in tam_02 endif if used('tam_03') use in tam_03 endif return **************** proc hmember **************** ** Thêm member cho group private moldFilter, moldorder if eof() =hmessbox("Chưa Có Group",'!') return endif mfilt=set('filt') set filt to mgroupname=f_login push key do hsetonkey midgpmem=gusers.f_iduser ** ID của group mrecgrp=recn() do hmofile with 'ggroups',0,0,0,'f_idgroup' seek midgpmem copy rest while f_idgroup=midgpmem to tam_03 sele tam_03.f_iduser, f_login, f_username from tam_03, gusers where tam_03.f_iduser=gusers.f_iduser into dbf tam_01 ** Thanh vien da tham gia group sele f_iduser, f_login, f_username from gusers where ; empty(f_groupis) and gusers.f_iduser not in (sele tam_03.f_iduser from tam_03) into dbf tam_02 ** Thanh vien chua tham gia group mmcol=2 ***Source sele tam_01 mmRowSource=recc() copy all to array arraySource field f_login, f_username ***Select sele tam_02 mmRowSelect=recc() copy all to array arraySelect field f_login, f_username if type('arraySource')='U' dime arraySource(1,2) endif if type('arraySelect')='U' dime arraySelect(1,2) endif mtxt1="User Đã Tham Gia Nhóm "+ allt(mgroupname) mtxt2="User Chưa Tham Gia Nhóm "+ allt(mgroupname) quscancel=.f. do form (qpathform+'\hMoveUG') with mtxt1, mtxt2 , 'Danh Sách User Tham Gia Nhóm' if !quscancel sele tam_01 dele all use dbf() excl pack if !empty(arraySource(1,1)) appe from array arraySource field f_login, f_username endif sele gusers moldorder=order() moldFilter=set('Filter') set order to f_login set filter to sele tam_01 set relation to f_login into gusers repl all f_iduser with gusers.f_iduser sele tam_02 dele all use dbf() excl pack if !empty(arraySelect(1,1)) appe from array arraySelect field f_login, f_username endif set relation to f_login into gusers repl all f_iduser with gusers.f_iduser sele gusers set filter to &moldFilter do hgankqgp sele gusers set order to &moldorder endif sele ggroups use release arraySource,arraySelect do hdeletam pop key sele gusers go mrecgrp set filt to &mfilt return ***************** proc hgankqgp ***************** sele ggroups seek midgpmem set dele off dele rest while f_idgroup=midgpmem sele tam_01 scan all for !dele() sele ggroups seek midgpmem loca rest while f_idgroup=midgpmem for dele() if found() reca else appe blan repl f_idgroup with midgpmem endif repl f_iduser with tam_01.f_iduser endscan set dele on sele tam_01 use sele tam_02 use sele tam_03 use return ******************* proc hgankquser ******************* sele ggroups seek midusermem set dele off dele rest while f_iduser=midusermem sele tam_01 scan all for !dele() sele ggroups seek midusermem loca rest while f_iduser=midusermem for dele() if found() reca else appe blan repl f_iduser with midusermem endif repl f_idgroup with tam_01.f_iduser endscan set dele on sele tam_01 use sele tam_02 use sele tam_03 use return *********** proc hbot *********** ** Bớt user para mugrp if f_login='HTQL' and mugrp=1 =hmessbox('User Quản Trị Hệ thống. Không Thể Bớt '+mtxt+' này','!') return endif push key do hsetonkey mkd=hdungsai('s','Bớt '+mtxt+' '+allt(f_username)+' ?') if mkd=1 mid=gusers.f_iduser do hmofile with 'ggroups' if mugrp=1 dele all for f_idgroup=mid else dele all for f_iduser=mid endif use sele gusers dele do hrefresh do hintbao with 'CLOSE' endif pop key return ***************** proc hxemuser ***************** para mugrp mfilt=set('filt') set filt to push key do hsetonkey mreccus=recn() ** Get password dong thoi la bien public mf_password=f_password mf_login=f_login mf_username=f_username mf_adminis=f_adminis mf_cmdlevel=f_cmdlevel matkhau=hun_real(mf_password) if hinputuser(0,mugrp) do hreturnrec with mreccus repl f_groupis with iif(mugrp=1,0,1) repl f_password with mf_password repl f_login with mf_Login repl f_username with mf_username repl f_adminis with mf_adminis REPLACE f_cmdlevel WITH mf_cmdlevel