function index_action() { if ($_COOKIE['uid'] != "" && $_COOKIE['username'] != "") { if ($_GET['type'] == "out") { if ($this->config['sy_uc_type'] == "uc_center") { $M = $this->MODEL(); $M->uc_open(); $logout = uc_user_synlogout(); } elseif ($this->config['sy_pw_type']) { include APP_PATH . "/api/pw_api/pw_client_class_phpapp.php"; $username = $_SESSION['username']; $pw = new PwClientAPI($username, "", ""); $logout = $pw->logout(); $this->unset_cookie(); } else { $this->unset_cookie(); } } else { $this->ACT_msg("index.php", "您已经登录了!"); } } if ($_GET['backurl'] == '1') { setCookie("backurl", $_SERVER['HTTP_REFERER'], time() + 60); } if (!$_GET['usertype']) { $_GET['usertype'] = 1; } $this->yunset("usertype", $_GET['usertype']); $this->yunset("loginname", $_COOKIE['loginname']); $this->seo("login"); $this->yun_tpl(array('index')); }
function logout($result = true) { if ($this->config['sy_uc_type'] == "uc_center") { $this->obj->uc_open(); echo $logout = uc_user_synlogout(); } elseif ($this->config["sy_pw_type"]) { include APP_PATH . "/api/pw_api/pw_client_class_phpapp.php"; $username = $_SESSION["username"]; $pw = new PwClientAPI($username, "", ""); $logout = $pw->logout(); $this->unset_cookie(); } else { $this->unset_cookie(); } if ($result) { echo 1; die; } }
function logout($result = true) { $uiddir = DATA_PATH . "cache/im/"; include $uiddir . "/status.php"; $liststatus = unserialize(base64_decode($statusdata)); if (!empty($liststatus[$this->uid])) { unset($liststatus[$this->uid]); unset($liststatus[$this->uid . "time"]); } $content = base64_encode(serialize($liststatus)); $cont = "<?php"; $cont .= "\r\n"; $cont .= "\$statusdata='" . $content . "';"; $cont .= "?>"; $fp = @fopen($uiddir . "/status.php", "w+"); $filetouid = @fwrite($fp, $cont); @fclose($fp); if ($this->config['sy_uc_type'] == "uc_center") { $this->uc_open(); $logout = uc_user_synlogout(); echo $logout; } elseif ($this->config["sy_pw_type"]) { include APP_PATH . "/api/pw_api/pw_client_class_phpapp.php"; $username = $_SESSION["username"]; $pw = new PwClientAPI($username, "", ""); $logout = $pw->logout(); $this->unset_cookie(); } else { $this->unset_cookie(); } if ($result) { echo 1; die; } }