87,907
社区成员
发帖
与我相关
我的任务
分享
this.start = function() {
if(session_user) {
this.user = session_user;
this.onLoad();
} else {
this.d199();
if(this.user.email && this.user.password) {
request.send({act: "start_user", user_id: this.user.id, email: this.user.email, password: this.user.password}, this);
} else {
request.send({act: "start_anonymus", user_id: this.user.id}, this);
}
}
session_start();
echo "session_user = ".$_SESSION["logged_user"];
if(empty($_SESSION['logged_user'])){
header("Location: index.php");
}
else header("Location: index.php?id=".$_SESSION['logged_user']);
this.d199 = function() {
this.anonymusId = getCookie("anonymusid");
this.user.id = getCookie("userid");
this.user.email = getCookie("useremail");
this.user.password = getCookie("userpassword");
}
this.d200 = function() {
setCookie("userid", this.user.id);
setCookie("useremail", this.user.email);
setCookie("userpassword", this.user.password);
}
this.start = function() {
if(session_user) {
this.user = session_user;
this.onLoad();
} else {
this.d199();
if(this.user.email && this.user.password) {
request.send({act: "start_user", user_id: this.user.id, email: this.user.email, password: this.user.password}, this);
} else {
request.send({act: "start_anonymus", user_id: this.user.id}, this);