ASP to judge user login

Source: Internet
Author: User

function Chklogin (b) {

Isiteid = 1
/*
if (isNaN (Isiteid) | | isiteid<1) {
Not logined
if (b) {
Do Login
if (Dologin ()) return true;
else DoAlert ("", "login.asp?innerurl=" +surl);
}else{
Isiteid = 0;
return false;
}
}else{
return true;
}
*/
isNaN (Isiteid);
Dologin ();
return true;
}
/*
function Dologin () {
var SUID = Str4sql (Request ("UID") + "");
var spwd = Str4sql (Request ("PWD") + "");
var sinnerurl = Str4sql (Request ("Innerurl") + "");
if (suid.length<1| | suid== "undefined") return false;
ssqlstring = "Select Siteid,pwd,siteopen from T_site where uid= '" +suid+ "";
var oRs = Oconn.execute (ssqlstring);
if (ors.eof) DoAlert ("User does not exist", "login.asp?innerurl=" +surl);
else if (Spwd!=ors.fields.item (1). Value&&ors.fields.item (2). value<1) DoAlert ("Password Error", "Login.asp");
Isiteid = ORs.fields.item (0). value;
Session ("cc_count_6_site_id") = Isiteid;
if (sinnerurl&&sinnerurl!= "undefined") DoAlert ("", Sinnerurl);
else DoAlert ("", "Login.asp");
return true;
}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.