function genpermcheck(aid,bid,base) { var url = base || ''; var contentid = number(aid) || ''; var channelid = number(bid) || ''; console.log(url,contentid,channelid); $.ajax({ url: url + "/permcheck", data: { contentid:contentid || '', channelid:channelid || '' }, success: function (result) { if (result.data == 3||result.data == 4){ location.href = url + "/common-errorauth.htm"; } else if(result.data!=1){ location.href = url + "/login"; } } }); }