当前位置: 首页>>代码示例>>PHP>>正文


PHP dbstuff::result_first方法代码示例

本文整理汇总了PHP中dbstuff::result_first方法的典型用法代码示例。如果您正苦于以下问题:PHP dbstuff::result_first方法的具体用法?PHP dbstuff::result_first怎么用?PHP dbstuff::result_first使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在dbstuff的用法示例。


在下文中一共展示了dbstuff::result_first方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: formhash

    }
    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 = 'logging.php?action=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)) {
开发者ID:xiaoxiaoleo,项目名称:ngintek,代码行数:31,代码来源:common.inc.php

示例2: dbstuff

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 '用户不存在,或者被删除';
开发者ID:kiah2008,项目名称:coordinate-talk.website,代码行数:31,代码来源:login_db.php

示例3: dbstuff

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') {
开发者ID:BGCX067,项目名称:f2cont-svn-to-git,代码行数:31,代码来源:relatekw.php


注:本文中的dbstuff::result_first方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。