【文章內容簡介】
xit SubEnd If classmodi = False (0)End SubPublic Sub clabrowse()txtsql = select * from class (0) = 瀏覽班級設置End SubPrivate Sub classbrowse_Click()qxstr = Executeqx(2)If qxstr = false Then ss = MsgBox(對不起,你沒有管理本功能的權限,請與管理員聯(lián)系!, vbInformation + vbOKOnly, 警告) Exit SubEnd IfEnd SubPrivate Sub classfind_Click()qxstr = Executeqx(2)If qxstr = false Then ss = MsgBox(對不起,你沒有管理本功能的權限,請與管理員聯(lián)系!, vbInformation + vbOKOnly, 警告) Exit SubEnd If (0)End SubPrivate Sub find_Click() End SubPrivate Sub classkecheng_Click()qxstr = Executeqx(4)If qxstr = false Then ss = MsgBox(對不起,你沒有管理本功能的權限,請與管理員聯(lián)系!, vbInformation + vbOKOnly, 警告) Exit SubEnd IfEnd SubPrivate Sub denglu2_Click()Unload MeEnd SubPrivate Sub jiaofeiadd_Click()qxstr = Executeqx(3)If qxstr = false Or qxstr = readonly Then ss = MsgBox(對不起,你沒有管理本功能的權限,請與管理員聯(lián)系!, vbInformation + vbOKOnly, 警告) Exit SubEnd If 0End SubPrivate Sub jiaofeibrowse_Click()qxstr = Executeqx(3)If qxstr = false Then ss = MsgBox(對不起,你沒有管理本功能的權限,請與管理員聯(lián)系!, vbInformation + vbOKOnly, 警告) Exit SubEnd If 0End SubPrivate Sub jiaofeifind_Click()qxstr = Executeqx(3)If qxstr = false Then ss = MsgBox(對不起,你沒有管理本功能的權限,請與管理員聯(lián)系!, vbInformation + vbOKOnly, 警告) Exit SubEnd IfEnd SubPrivate Sub jibenkecheng_Click()qxstr = Executeqx(4)If qxstr = false Then ss = MsgBox(對不起,你沒有管理本功能的權限,請與管理員聯(lián)系!, vbInformation + vbOKOnly, 警告) Exit SubEnd If 0End SubPrivate Sub leixing_Click()qxstr = Executeqx(4)If qxstr = false Then ss = MsgBox(對不起,你沒有管理本功能的權限,請與管理員聯(lián)系!, vbInformation + vbOKOnly, 警告) Exit SubEnd If 0End SubPrivate Sub liulan_Click()qxstr = Executeqx(2)If qxstr = false Then ss = MsgBox(對不起,你沒有管理本功能的權限,請與管理員聯(lián)系!, vbInformation + vbOKOnly, 警告) Exit SubEnd If find = False End SubPrivate Sub MDIForm_Load()39。username = 0001 = connstring(2).Text = Now(3).Text = 當前操作員: amp。 usernameDim aa As StringSelect Case Executeqx(1)Case admin aa = 超級管理員Case readonly aa = 只讀管理員Case Else aa = 普通管理員End Select(4).Text = 狀態(tài): amp。 aaEnd SubPrivate Sub useradd_Click()qxstr = Executeqx(1)If qxstr = false Or qxstr = readonly Then ss = MsgBox(對不起,你沒有管理本功能的權限,請與管理員聯(lián)系!, vbInformation + vbOKOnly, 警告) Exit SubEnd If 0End SubPrivate Sub usermodi_Click()qxstr = Executeqx(1)If qxstr = false Then ss = MsgBox(對不起,你沒有管理本功能的權限,請與管理員聯(lián)系!, vbInformation + vbOKOnly, 警告) Exit Sub End IfEnd SubPrivate Sub xuefeiadd_Click()qxstr = Executeqx(3)If qxstr = false Or qxstr = readonly Then ss = MsgBox(對不起,你沒有管理本功能的權限,請與管理員聯(lián)系!, vbInformation + vbOKOnly, 警告) Exit SubEnd If xuefeimodi = False Dim i As Integer For i = 0 To 3 (i).Enabled = True Next i = 添加班級設置 For i = 0 To 3 (i).Text = Next i = 0End SubPublic Sub xfbrowse()txtsql = select * from xuefei order by 學期 desc, 年級 desc,專業(yè) desc (0) = 瀏覽學費設置End SubPrivate Sub xuefeibrowse_Click()qxstr = Executeqx(3)If qxstr = false Then ss = MsgBox(對不起,你沒有管理本功能的權限,請與管理員聯(lián)系!, vbInformation + vbOKOnly, 警告) Exit SubEnd If End SubPrivate Sub xuefeifind_Click()qxstr = Executeqx(3)If qxstr = false Then ss = MsgBox(對不起,你沒有管理本功能的權限,請與管理員聯(lián)系!, vbInformation + vbOKOnly, 警告) Exit SubEnd If (0) i = SetWindowPos(, 1, 0, 0, 0, 0, 3)End Sub4.3用戶管理模塊:本模塊是本系統(tǒng)的安全性設置模塊,根據(jù)健身中心不同部門以及不同使用人員對本系統(tǒng)的要求和需要,從而實行了分級管理,對用戶的權限和類別進行了分類管理。從而新用戶和會員用戶可以擁有不同的權限,執(zhí)行不同的操作,以達到更為科學和有效的管理。Private Sub Command1_Click()If Trim(Text1(0).Text) = Then MsgBox 用戶名不能為空!, vbExclamation + vbOKOnly, 警告 Text1(0).SetFocus Exit SubEnd IfIf Trim(Text1(1).Text) = Then MsgBox 密碼不能為空!, vbExclamation + vbOKOnly, 警告 Text1(1).SetFocus Exit SubEnd IfIf Trim(Text1(2).Text) = Then MsgBox 確認密碼不能為空!, vbExclamation + vbOKOnly, 警告 Text1(2).SetFocus Exit SubEnd IfIf Trim(Text1(1).Text) Trim(Text1(2).Text) Then MsgBox 確認密碼不正確!, vbExclamation + vbOKOnly, 警告 Text1(2).SetFocus Exit SubEnd IfDim aa As Integeraa = 0If Option1(2).Value = True Then For i = 0 To 3 If Check1(i).Value = 1 Then aa = 1 Exit For End IfNext iIf aa = 0 Then MsgBox 普通用戶至少要有一項權限!, vbExclamation + vbOKOnly, 警告Exit SubEnd IfEnd IfDim mrc As txtsql = select * from use where username=39。 amp。 Trim(Text1(0).Text) amp。 39。Set mrc = ExecuteSQL(txtsql)If = False Then MsgBox 已存在該用戶!, vbExclamation + vbOKOnly, 警告 Text1(0).SetFocus Text1(0).SelStart = 0 Text1(0).SelLength = Len(Text1(0).Text) Exit SubEnd Iftxtsql = select * from useSet mrc = ExecuteSQL(txtsql) (0) = Trim(Text1(0).Text) (1) = Trim(Text1(1).Text)For i = 0 To 2 If Option1(i).Value = True Then Select Case i Case 0 (admin) = y Case 1 (readonly) = y Case 2 For j = 0 To 3 If Check1(j).Value = 1 Then Select Case j Case 0 (qx1) = y Case 1 (qx2) = y Case 2 (qx3) = y Case 3 (qx4) = y End Select End If Next j End Select End If Next i MsgBox 用戶添加成功!, vbExclamation + vbOKOnly, 警告 Text1(0).Text = Text1(1).Text = Text1(2).Text = End SubPrivate Sub Command2_Click()Unload MeEnd SubPrivate Sub Form_Load()Option1(2).Value = TrueEnd SubPrivate Sub Form_Resize()Text1(0).SetFocusEnd SubPrivate Sub Option1_Click(Index As Integer)If Index 2 ThenFor i = 0 To 3 Check1(i).Enabled = FalseNext iElseFor i = 0 To 3 Check1(i).Enabled = TrueNext iEnd IfEnd Sub4.4會員檔案管理模塊:因為本系統(tǒng)中有些功能模塊具有相似之處,因此在本文只用此模塊進行一個簡單的說明。其它的相似模塊的代碼可能參閱本模塊的設計思路。