我在我的php文件的开头有以下代码,但是不知何故它不会重定向到登录页面,但是,如果我将条件分为子条件,则重定向有效 以下代码无效
size()
下面的代码工作
Private Sub btnGetData_Click() ' Btn "GetData"
Dim rst As Object
Set rst = Me.RecordsetClone
rst.FindFirst "[ID] = " & Me.lstStaff.Value
If Not rst.EOF Then Me.Bookmark = rst.Bookmark
With Me.lstStaff
If IsNull(.Value) Then .Value = .ItemData([ID])
Me.Call.Value = .Column(1)
Me.QRA.Value = .Column(2)
Me.QTH.Value = .Column(3)
End With
End Sub
Private Sub btnInsert_Click() ' Btn "INSERT"
Dim SQL
SQL = "INSERT INTO tblStaff (Call,QRA,QTH,RST,QRG,TimeStart,TimeEnd)" & _
"VALUES (Call,QRA,QTH,RST,QRG,TimeStart,TimeEnd)" & "CurrentDb.Execute SQL"
DoCmd.RunCommand acCmdSaveRecord
DoCmd.GoToRecord , , acNewRec
End Sub
有人可以帮忙吗?
答案 0 :(得分:0)
这更容易阅读,可能您想这样做:
if (!isset($_SESSION['emailid'], $_SESSION['roleid']) or (isset($_SESSION['roleid']) and $_SESSION['roleid'] != 1)) {
header('location:login.php?lmsg=true');
exit;
}