/** function to check user's membership record while login and logout **/
function civi_member_sync_check($username, $user)
{
    global $current_user;
    if (!$user) {
        $user = $current_user;
    }
    if ($user->data) {
        $user = $user->data;
    }
    member_check($user->ID, $user->roles);
}
Example #2
0
		<div id="member-view-join" class="member-view-meta"><span>JOIN DATE: </span><strong><?php 
echo date('Y/m/d H:i', strtotime($row["member_registered"]));
?>
</strong></div>
	</div>
	<div id="member-view-text">
	<span></span>
	<?php 
echo nl2br($row["member_text"]);
?>
	</div>
</div>
<div id="member-view-actions">
Last Log-in Time: <?php 
echo date('Y/m/d H:i', strtotime($row["member_last_enter"]));
if (member_check() && $_SESSION['member_id'] == $row['id']) {
    ?>
<span id="member-view-modify">
<img src="<?php 
    echo get_stuff('silk/user_edit.png');
    ?>
" alt="*"><a href="<?php 
    echo OUT_PATH;
    ?>
modify" title="修改註冊資料">修改資料</a>
</span>
<?php 
}
?>
</div>
<?php 
<?php

/**
 * [WDL] Copyright (c) 2013 wormwood.com
 */
defined('IN_IA') or exit('Access Denied');
if (checksubmit()) {
    require_once IA_ROOT . '/source/model/member.mod.php';
    hooks('member:register:before');
    $member = array();
    $member['username'] = trim($_GPC['username']);
    if (!preg_match(REGULAR_USERNAME, $member['username'])) {
        message('必须输入用户名,格式为 3-15 位字符,可以包括汉字、字母(不区分大小写)、数字、下划线和句点。');
    }
    if (member_check(array('username' => $member['username']))) {
        message('非常抱歉,此用户名已经被注册,你需要更换注册名称!');
    }
    $member['password'] = $_GPC['password'];
    if (istrlen($member['password']) < 8) {
        message('必须输入密码,且密码长度不得低于8位。');
    }
    $member['remark'] = $_GPC['remark'];
    $member['groupid'] = intval($_GPC['groupid']);
    $uid = member_register($member);
    if ($uid > 0) {
        unset($member['password']);
        $member['uid'] = $uid;
        //有用户组则添加相关权限
        if (!empty($member['groupid'])) {
            $group = pdo_fetch("SELECT modules FROM " . tablename('members_group') . " WHERE id = :id", array(':id' => $member['groupid']));
            if (!empty($group['modules'])) {
Example #4
0
$page_title = '刪除文章「' . $title . '」? - ' . APP_NAME;
include load_template('header');
?>
			<div id="post-certify">
				<div id="post-form-actions">
					<form name="post-certify" method="POST" action="<?php 
echo OUT_PATH;
?>
action/post_delete" id="post-form-delete">
						<span id="post-delete-certify">確定要刪除文章「<?php 
echo $title;
?>
」?</span>
<?php 
if (!member_check()) {
    ?>
						<label id="post-form-pass" title="輸入密碼以驗證刪除權限">Password: <?php 
    echo $input_password;
    ?>
</label>
<?php 
}
?>
						<input type="hidden" name="who" value="<?php 
echo $who;
?>
">
						<input type="hidden" name="id" value="<?php 
echo $id;
?>
Example #5
0
?>
	<div id="post-textarea">
		<textarea name="post_content"><?php 
echo $content;
?>
</textarea>
	</div>
	<div id="post-modify">
	</div>
	<div id="post-form-actions">
		<span id="post-form-ip">YOUR IP: <?php 
echo $_SERVER['REMOTE_ADDR'];
?>
</span>
<?php 
if (member_check()) {
    ?>
		<label id="post-form-modify">MODIFY BY: <?php 
    echo $modify;
    ?>
</label>
<?php 
}
?>
		<input type="submit" name="edit" value="修改">
		<input type="hidden" name="id" value="<?php 
echo $to;
?>
">
		<input type="hidden" name="board" value="<?php 
echo $BD;
Example #6
0
File: lib.php Project: kidwm/kidbox
function member_panel()
{
    if (member_check()) {
        $result = inget('`id`, `member_login`, `member_email`, `member_nicename`', 'members', "WHERE `id` = '" . $_SESSION['member']['id'] . "'");
        $row = mysql_fetch_assoc($result);
        include load_template('member_panel');
    } else {
        include load_template('member_gate');
    }
}