Skip to content

Instantly share code, notes, and snippets.

@ybigus
Created September 6, 2013 14:45
Show Gist options
  • Save ybigus/6464829 to your computer and use it in GitHub Desktop.
Save ybigus/6464829 to your computer and use it in GitHub Desktop.
var parameters = new Array();
parameters.push({ Name: 'login', Value: login });
parameters.push({ Name: 'password' , Value: hex_md5(password) });
DBManager.runQuery( 'spLogin', parameters, function(result){
if (result.length > 0) {
userId = result[0].Token;
$.cookie( 'auth', userId);
$.cookie( 'userId', result[0].ID);
window.location.hash = '/tasks';
}
else {
alert( 'Wrong User Login Or Password' )
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment