以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  判断后跳转  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=145777)

--  作者:刘林
--  发布时间:2020/2/7 8:59:00
--  判断后跳转
 下载信息  [文件大小:   下载次数: ]
图片点击可在新窗口打开查看点击浏览该文件:tx1.txt


请老师帮看下这个跳转判断该怎样才对

我发现是当cookies("username")和cookies("password")存在,就可以,如果不存在(第一次输入帐号,密码)就会出现直接跳转
[此贴子已经被作者于2020/2/7 9:18:43编辑过]

--  作者:blackzhu
--  发布时间:2020/2/7 9:27:00
--  
if(cookies("username") !=\'\'){
  执行操作
}

--  作者:有点蓝
--  发布时间:2020/2/7 9:36:00
--  
Dim pr As DataRow = DataTables("学生库").sqlfind("身份证号 = \'" & UserName & "\'")
--  作者:刘林
--  发布时间:2020/2/7 9:42:00
--  

 下载信息  [文件大小:   下载次数: ]
图片点击可在新窗口打开查看点击浏览该文件:tx1 - 副本.txt

为了解决上面问题,我理了下,这样改我自己理解的逻辑感觉更清楚,但错误提示toptips显示在单独的页上且返不回,不是之前可以显示在logon的顶部,请老师问哪里错了


--  作者:刘林
--  发布时间:2020/2/7 9:45:00
--  
改成3楼,但要弹出一个空面提示框,没有提示什么内容
--  作者:有点蓝
--  发布时间:2020/2/7 10:25:00
--  
toptips显示”在哪里页面里写,当然就在那个页显示。


Dim pr As DataRow = DataTables("学生库").sqlfind("身份证号 = \'" & e.Cookies("username") & "\'")
If pr IsNot Nothing
    Dim  nms() As  String =  {"姓名","班级","身份证号","家庭住址","户口地址","联系电话","留守情况","健康状况","贫困建档","邮政编码","民族","政治面貌","监护人姓名","就读方式","学校","户口性质"}
    For Each nm As String In nms
        If pr.IsNull(nm)
            wb.InsertHTML("<meta http-equiv=\'Refresh\' content=\'0; url=gxxg.htm\'>")\'
            e.WriteString(wb.Build) \'
            Return \'
        End If
    Next
    wb.InsertHTML("<meta http-equiv=\'Refresh\' content=\'0; url=xtsy.htm\'>")\'直接跳转到首页
Else
    wb.InsertHTML("<meta http-equiv=\'Refresh\' content=\'0; url=gxxg.htm\'>")\'
End If
e.WriteString(wb.Build) \'
Return \'
[此贴子已经被作者于2020/2/7 10:26:13编辑过]

--  作者:刘林
--  发布时间:2020/2/7 10:32:00
--  

是这样写的,但显示结果是logon的页面内容没有了,整个页面只有toptips一条红框显示在顶上,提示内容也显示了的,到了指定时间就整个页面成白的了也返不回


--  作者:有点蓝
--  发布时间:2020/2/7 11:13:00
--  
所有有关的代码完整给出来,或者做个可以测试的例子发上来
--  作者:刘林
--  发布时间:2020/2/7 14:12:00
--  
text中有
--  作者:有点蓝
--  发布时间:2020/2/7 15:00:00
--  
TopTips参考这里的用法:http://www.foxtable.com/mobilehelp/topics/0083.htm,或者这:http://www.foxtable.com/mobilehelp/topics/0138.htm

Dim wb As New WeUI \'
wb.InsertHTML("<hr>")
wb.InsertHTML("<hr>")
If e.Cookies.ContainsKey("username") And e.cookies.ContainsValue("passwored")
    Dim dr As DataRow = DataTables("用户").sqlfind("[身份证号]=\'" & e.Cookies("username") & "\' and password= \'" & e.Cookies("username") & "\'")
    If dr IsNot Nothing
        wb.InsertHTML("<meta http-equiv=\'Refresh\' content=\'0; url=xtsy.htm\'>")\'直接跳转到首页
    End If
Else
    If e.PostValues.ContainsKey("username") And e.PostValues.ContainsKey("password")  Then \'判断是否是验证失败后的重新登录
        wb.AddTopTips("","toptip1","用户名密码错误或已停用!").msec = 3000 \'如果用户通过登录按钮访问,则给用户一个2秒的提示.
    End If
    If e.PostValues.Count=0
        wb.AddPageTitle("","pageheader","内江市教务系统","专做实用,更专注适用")
        wb.AddForm("","form1","logon.htm")
        With wb.AddInputGroup("form1","ipg1")
            Dim In1= .AddInput("username","户名:","text")
            In1.placeholder ="身份证号"
            In1.value=e.Cookies("username")
            .AddInput("password","密码:","password").Placeholder="密码"
        End With
        With wb.AddButtonGroup("form1","btg1",False)
            .Add("btn1", "登录", "submit").kind=1
            .Add("btn2", "注册", "", "zc.htm").kind=1
            .Add("btn3", "APP安装","","http://47.92.95.136:8080/教务系统.apk").kind=1
        End With
        wb.InsertHTML("form1","<div style=\'width:100%;height:100px;vertical-align: middle;text-align: center;margin-top:20px;\'><img style=\'width:100px;height:100%\' src=\'./images/ewm.png\'></img><img style=\'width:100px;height:100%;\' src=\'./images/tel.png\' ></img></div>")
        wb.InsertHTML("form1","<p style=\'font-size:20px;color:red;margin:30px 10px 10px;\'>温馨提示:</p>")
        wb.InsertHTML("form1","<p> 1.首次手机使用请点APP安装.</p>")
        wb.InsertHTML("form1","<p> 2.已有电脑端帐号请以电脑端身份信息为帐号登录.</p>")
        wb.InsertHTML("form1","<p> 3.新用户注册帐号务必以自己真实身份证号为帐号.</p>")
    End If
    e.WriteString(wb.Build)
End If
e.Handled =True