本文整理汇总了PHP中member::add方法的典型用法代码示例。如果您正苦于以下问题:PHP member::add方法的具体用法?PHP member::add怎么用?PHP member::add使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类member
的用法示例。
在下文中一共展示了member::add方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: exit
if ($uid == -2) {
exit('passport');
}
}
if ($post['regid'] == 5) {
$post['company'] = $post['truename'];
}
$post['groupid'] = $need_check ? 4 : $post['regid'];
$post['content'] = $post['introduce'] = $post['thumb'] = $post['banner'] = $post['catid'] = $post['catids'] = '';
$post['edittime'] = 0;
$inviter = get_cookie('inviter');
$post['inviter'] = $inviter ? decrypt($inviter, DT_KEY . 'INVITER') : '';
check_name($post['inviter']) or $post['inviter'] = '';
require DT_ROOT . '/module/member/member.class.php';
$do = new member();
if ($do->add($post)) {
$note = timetodate($DT_TIME, 5) . '|system|' . $L['register_note'];
$db->query("UPDATE {$DT_PRE}member SET note='{$note}' WHERE userid='{$do->userid}'");
$_SESSION['m_name'] = $post['username'];
$_SESSION['m_pass'] = $post['password'];
exit('ok');
} else {
echo $do->errmsg;
if (DT_CHARSET != 'UTF-8') {
toutf8();
}
exit;
}
break;
default:
$back_link = 'login.php';
示例2: lang
case 'add':
if ($submit) {
$member['groupid'] = $member['regid'];
if ($member['groupid'] == 5) {
$member['company'] = $member['truename'];
}
$member['passport'] = $member['passport'] ? $member['passport'] : $member['username'];
$member['edittime'] = $member['edittime'] ? $DT_TIME : 0;
$member['inviter'] = $member['username'];
if ($MFD) {
fields_check($post_fields, $MFD);
}
if ($CFD) {
fields_check($post_fields, $CFD);
}
if ($do->add($member)) {
if ($MFD) {
fields_update($post_fields, $do->table_member, $do->userid, 'userid', $MFD);
}
if ($CFD) {
fields_update($post_fields, $do->table_company, $do->userid, 'userid', $CFD);
}
if ($MOD['welcome_sms'] && $DT['sms'] && is_mobile($member['mobile'])) {
$message = lang('sms->wel_reg', array($member['truename'], $DT['sitename'], $member['username'], $member['password']));
$message = strip_sms($message);
send_sms($member['mobile'], $message);
}
if ($MOD['welcome_message'] || $MOD['welcome_email']) {
$post = $member;
$username = $member['username'];
$email = $member['email'];