Initial commit
Some checks failed
定时更新GitHub源插件 / 自动更新GitHub插件 (push) Has been cancelled

This commit is contained in:
chorblack
2026-03-07 11:19:25 +08:00
commit e75f275ef4
4484 changed files with 645480 additions and 0 deletions

View File

@@ -0,0 +1,64 @@
<?php
class changyandandian_Action extends Widget_Abstract_Contents implements Widget_Interface_Do
{
public function __construct($request, $response, $params = NULL) {
parent::__construct($request, $response, $params);
}
public function execute()
{
}
public function action()
{
if($this->user->hasLogin()){
$ret=array(
"is_login"=>1, //已登录,返回登录的用户信息
"user"=>array(
"user_id"=>$this->user->uid,
"nickname"=>$this->user->screenName,
"img_url"=>"https://gravatar.helingqi.com/wavatar/".md5($this->user->mail)."?d=mm",
"profile_url"=>$this->user->url,
"sign"=>"zezechupin", //注意这里的sign签名验证已弃用任意赋值即可
'reload_page'=>1,
));
setcookie("cyCookie",'1');//畅言已通过站点账号自动登录使用cookie做个标记用于判断进行同步登出
}else{
$ret=array("is_login"=>0);//未登录
}
echo $_GET['callback'].'('.json_encode($ret).')';
}
public function logout(){
if(!$this->user->hasLogin()){
$return=array(
'code'=>1,
'reload_page'=>1,
);
}else{
$this->user->logout();
$return=array(
'code'=>1,
'reload_page'=>1,
);
}
echo $_GET['callback'].'('.json_encode($return).')';
}
}