📄 login.js
字号:
function getcookieval(offset) {
var endstr = document.cookie.indexOf(";",offset);
if (endstr == -1)
endstr = document.cookie.length;
return unescape (document.cookie.substring(offset,endstr));
}
function getcookie(name) {
var arg = name + '=';
var alen = arg.length;
var clen = document.cookie.length;
var j = 0;
while (j< clen) {
var k = j + alen;
if(document.cookie.substring(j,k) == arg) return getcookieval(k);
j = document.cookie.indexOf("",j)+1;
if (j ==0 ) break;
}
return null;
}
var username = getcookie("userid")
var usertype = getcookie("usertype")
if ((username != null) & (username != ""))
{
document.write("欢迎您:<B>");
document.write(getcookie("userid"));
document.write("</B> | ");
document.write("<a href='/zhai/logout.php'>注销</a> | ");
document.write("<a href='/zhai/mysetup.php'>修改资料</a> | ");
document.write("<a href='/zhai/icollect.php' title='添加新网摘'><font color=red>添加网摘</font></a> | ");
document.write("<a href='/zhai/myzhai.php' title='管理我的网摘'><font color=red>我的网摘</font></a> | ");
document.write("<a href='/zhai/myallpic.php' title='管理我的网摘'><font color=red>我的图片</font></a> | ");
document.write("<a href='/zhai/mypic.php' title='管理我的网摘'><font color=red>已审图片</font></a> | ");
}
else
{
document.write('用户登陆:用户名<input id="userName" name="userid" /> 密码<input id="password" name="psw" type="password" /> <input id="submit" name="submit" type="submit" value="登录" />');
document.write("<a href='/zhai/reg.php'>免费注册</a> ");
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -