} if ($adminid == 3) { $modadd1 = ', m.uid AS ismoderator'; $modadd2 = "LEFT JOIN {$tablepre}moderators m ON m.uid='{$discuz_uid}' AND m.fid=f.fid"; } } if ($errorreport == 2 || $errorreport == 1 && $adminid > 0) { error_reporting(E_ERROR | E_WARNING | E_PARSE); } define('FORMHASH', formhash()); $statstatus && !$inajax && (require_once DISCUZ_ROOT . './include/counter.inc.php'); $extra = isset($extra) && @preg_match("/^[&=;a-z0-9]+\$/i", $extra) ? $extra : ''; $rsshead = $navtitle = $navigation = ''; $_DSESSION['groupid'] = $groupid = empty($ipbanned) ? empty($groupid) ? 7 : intval($groupid) : 6; if (!@(include DISCUZ_ROOT . './forumdata/cache/usergroup_' . $groupid . '.php')) { $grouptype = $db->result_first("SELECT type FROM {$tablepre}usergroups WHERE groupid='{$groupid}'"); if (!empty($grouptype)) { $cachelost .= ' usergroup_' . $groupid; } else { $grouptype = 'member'; } } /* $link_login = '******'; $link_logout = 'logging.php?action=logout&formhash='.FORMHASH; $link_register = $regname; */ if ($discuz_uid && $_DSESSION) { if (!empty($groupexpiry) && $groupexpiry < $timestamp && !in_array(CURSCRIPT, array('wap', 'member'))) { dheader("Location: {$boardurl}member.php?action=groupexpiry"); } elseif ($grouptype && $groupid != getgroupid($discuz_uid, array('type' => $grouptype, 'creditshigher' => $groupcreditshigher, 'creditslower' => $groupcreditslower), $_DSESSION)) {
include '../config.inc.php'; include '../include/db_mysql.class.php'; $db = new dbstuff(); $db->connect($dbhost, $dbuser, $dbpw, $dbname, $pconnect); unset($dbhost, $dbuser, $dbpw, $dbname, $pconnect); include '../cta_client/client.php'; if (!empty($_GET['submit'])) { if (stripos($_POST['username'], "@")) { list($uid, $username, $password, $email) = uc_user_login($_POST['username'], $_POST['password'], 2); } else { //通过接口判断登录帐号的正确性,返回值为数组 list($uid, $username, $password, $email) = uc_user_login($_POST['username'], $_POST['password']); } setcookie('Cta_auth', '', -86400); if ($uid > 0) { if (!$db->result_first("SELECT count(*) FROM {$tablepre}members WHERE uid='{$uid}'")) { //判断用户是否存在于用户表,不存在则跳转到激活页面 $auth = rawurlencode(uc_authcode("{$username}\t" . time(), 'ENCODE')); echo '您需要需要激活该帐号,才能进入本应用程序<br><a href="' . $_SERVER['PHP_SELF'] . '?fun=register&action=activation&auth=' . $auth . '">继续</a>'; exit; } $imei = $db->result_first("SELECT imei FROM {$tablepre}members_imei WHERE uid='{$uid}'"); //用户登陆成功,设置 Cookie,加密直接用 uc_authcode 函数,用户使用自己的函数 // setcookie('Cta_auth', uc_authcode($uid . "\t" . $username . "\t" . $imei, 'ENCODE')); //生成同步登录的代码 $ucsynlogin = uc_user_synlogin($uid); echo '登录成功' . $ucsynlogin . '<br><a href="' . $_SERVER['PHP_SELF'] . '">继续</a>'; exit; } elseif ($uid == -1) { echo '用户不存在,或者被删除';
define('DISCUZ_ROOT', './'); define('IN_DISCUZ', TRUE); define('NOROBOT', TRUE); require_once './forumdata/cache/cache_settings.php'; if (!$_DCACHE['settings']['tagstatus']) { exit; } require_once './config.inc.php'; require_once './include/global.func.php'; if ($tid = @intval($_GET['tid'])) { require_once './include/db_' . $database . '.class.php'; $db = new dbstuff(); $db->connect($dbhost, $dbuser, $dbpw, $dbname, $pconnect, true, $dbcharset); $db->select_db($dbname); unset($dbhost, $dbuser, $dbpw, $dbname, $pconnect); if ($db->result_first("SELECT count(*) FROM {$tablepre}threadtags WHERE tid='{$tid}'")) { exit; } $query = $db->query("SELECT subject, message FROM {$tablepre}posts WHERE tid='{$tid}' AND first='1'"); $data = $db->fetch_array($query); $subject = $data['subject']; $message = cutstr($data['message'], 500, ''); } else { $subject = $_GET['subjectenc']; $message = $_GET['messageenc']; } $subjectenc = rawurlencode(strip_tags($subject)); $messageenc = rawurlencode(strip_tags(preg_replace("/\\[.+?\\]/U", '', $message))); $data = @implode('', file("http://keyword.discuz.com/related_kw.html?ics={$charset}&ocs={$charset}&title={$subjectenc}&content={$messageenc}")); if ($data) { if (PHP_VERSION > '5' && $charset != 'utf-8') {