本文整理汇总了PHP中member::get_one方法的典型用法代码示例。如果您正苦于以下问题:PHP member::get_one方法的具体用法?PHP member::get_one怎么用?PHP member::get_one使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类member
的用法示例。
在下文中一共展示了member::get_one方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: exit
<?php
defined('IN_DESTOON') or exit('Access Denied');
login();
require DT_ROOT . '/module/' . $module . '/common.inc.php';
require MD_ROOT . '/member.class.php';
require DT_ROOT . '/include/post.func.php';
$do = new member();
$do->userid = $_userid;
$user = $do->get_one();
$MFD = cache_read('fields-member.php');
$CFD = cache_read('fields-company.php');
isset($post_fields) or $post_fields = array();
if ($MFD || $CFD) {
require DT_ROOT . '/include/fields.func.php';
}
$group_editor = $MG['editor'];
in_array($group_editor, array('Default', 'Destoon', 'Simple', 'Basic')) or $group_editor = 'Destoon';
$tab = isset($tab) ? intval($tab) : 0;
if ($submit) {
if ($post['password'] && $user['password'] != md5(md5($post['oldpassword']))) {
message($L['error_password']);
}
if ($post['payword'] && $user['payword'] != md5(md5($post['oldpayword']))) {
message($L['error_payword']);
}
$post['groupid'] = $user['groupid'];
$post['email'] = $user['email'];
$post['passport'] = $user['passport'];
$post['company'] = $user['company'];
$post['domain'] = $user['domain'];
示例2: trim
case 'mobilecode':
$value = trim($value);
if (!preg_match("/[0-9]{6}/", $value)) {
exit(' ');
}
$session = new dsession();
if ($_SESSION['mobile_code'] != md5($_SESSION['mobile'] . '|' . $value)) {
exit(' ');
}
break;
case 'company':
if (!$value) {
exit($L['member_company_null']);
}
if (!$do->is_company($value)) {
exit($L['member_company_reg']);
}
if ($do->company_exists($value)) {
exit($L['member_company_reg']);
}
break;
case 'get_company':
$user = $do->get_one($value);
if ($user) {
echo '<a href="' . $user['linkurl'] . '" target="_blank" class="t">' . $user['company'] . '</a>' . ($user['vip'] ? ' <img src="' . DT_SKIN . 'image/vip.gif" align="absmiddle"/> <img src="' . DT_SKIN . 'image/vip_' . $user['vip'] . '.gif" align="absmiddle"/>' : '');
} else {
echo '1';
}
exit;
break;
}
示例3: dmsg
if ($MOD['welcome_email'] && $DT['mail_type'] != 'close') {
send_mail($email, $title, $content);
}
}
dmsg('添加成功', $forward);
} else {
msg($do->errmsg);
}
} else {
include tpl('member_add', $module);
}
break;
case 'edit':
$userid or msg();
$do->userid = $userid;
$user = $do->get_one();
if (!$_founder && $userid != $_userid && $user['groupid'] == 1) {
msg('您无权修改其他管理员资料');
}
if ($submit) {
if ($userid == $_userid && $member['password']) {
msg('系统检查到您要修改密码,正在进入密码修改界面...', '?action=password', 3);
}
$member['passport'] = $user['passport'];
$member['edittime'] = $member['edittime'] ? $DT_TIME : 0;
$member['validtime'] = $member['validtime'] ? strtotime($member['validtime']) : 0;
if ($userid == 1 || $userid == $CFG['founderid']) {
$member['groupid'] = 1;
}
if ($MFD) {
fields_check($post_fields, $MFD);