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


PHP groupexpiry函数代码示例

本文整理汇总了PHP中groupexpiry函数的典型用法代码示例。如果您正苦于以下问题:PHP groupexpiry函数的具体用法?PHP groupexpiry怎么用?PHP groupexpiry使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: elseif

     if ($postcomment_cache_pid) {
         C::t('forum_postcache')->delete($postcomment_cache_pid);
     }
     if (!$member['adminid']) {
         $member_status = C::t('common_member_status')->fetch($member['uid']);
         if ($member_status) {
             captcha::report($member_status['lastip']);
         }
     }
 } elseif ($member['groupid'] == 4 || $member['groupid'] == 5) {
     if (!empty($member['groupterms']['main']['groupid'])) {
         $groupidnew = $member['groupterms']['main']['groupid'];
         $adminidnew = $member['groupterms']['main']['adminid'];
         unset($member['groupterms']['main']);
         unset($member['groupterms']['ext'][$member['groupid']]);
         $setarr['groupexpiry'] = groupexpiry($member['groupterms']);
     }
     $groupnew = C::t('common_usergroup')->fetch_by_credits($member['credits']);
     $groupidnew = $groupnew['groupid'];
     $adminidnew = 0;
 } else {
     $update = false;
     $groupidnew = $member['groupid'];
     $adminidnew = $member['adminid'];
     if (in_array('avatar', $_GET['clear'])) {
         $setarr['avatarstatus'] = 0;
         loaducenter();
         uc_user_deleteavatar($member['uid']);
     }
 }
 if (!empty($my_data) && !empty($mylogtype)) {
开发者ID:MCHacker,项目名称:discuz-docker,代码行数:31,代码来源:admincp_members.php

示例2: IN

                    $groupidnew = $groupterms['main']['groupid'];
                    $adminidnew = $groupterms['main']['adminid'];
                } else {
                    $groupidnew = $db->result_first("SELECT groupid FROM {$tablepre}usergroups WHERE type='member' AND '{$credits}'>=creditshigher AND '{$credits}'<creditslower LIMIT 1");
                    if (in_array($adminid, array(1, 2, 3))) {
                        $query = $db->query("SELECT groupid FROM {$tablepre}usergroups WHERE groupid IN ('" . implode('\',\'', $extgroupidarray) . "') AND radminid='{$adminid}' LIMIT 1");
                        $adminidnew = $db->num_rows($query) ? $adminid : 0;
                    } else {
                        $adminidnew = 0;
                    }
                }
                unset($groupterms['main']);
            }
            unset($groupterms['ext'][$expgroupid]);
        }
        $groupexpirynew = groupexpiry($groupterms);
        $extgroupidsnew = implode("\t", $extgroupidarray);
        $grouptermsnew = addslashes(serialize($groupterms));
        $db->query("UPDATE {$tablepre}members SET adminid='{$adminidnew}', groupid='{$groupidnew}', extgroupids='{$extgroupidsnew}', groupexpiry='{$groupexpirynew}' WHERE uid='{$discuz_uid}'");
        $db->query("UPDATE {$tablepre}memberfields SET groupterms='{$grouptermsnew}' WHERE uid='{$discuz_uid}'");
    }
    include template('groupexpiry');
} elseif ($action == 'switchstatus' && $discuz_uid) {
    if (!$allowinvisible) {
        showmessage('group_nopermission', NULL, 'NOPERM');
    }
    $db->query("UPDATE {$tablepre}members SET invisible = !invisible WHERE uid='{$discuz_uid}'", 'UNBUFFERED');
    include language('misc');
    showmessage($invisible ? '<a href="member.php?action=switchstatus" title="' . $language['login_switch_invisible_mode'] . '" ajaxtarget="loginstatus">' . $language['login_normal_mode'] . '</a>' : '<a href="member.php?action=switchstatus" title="' . $language['login_switch_normal_mode'] . '" ajaxtarget="loginstatus">' . $language['login_invisible_mode'] . '</a>', dreferer());
} else {
    showmessage('undefined_action', NULL, 'HALTED');
开发者ID:BGCX067,项目名称:f2cont-svn-to-git,代码行数:31,代码来源:member.php

示例3: array

         $member['groupterms']['main'] = array('time' => $_G['gp_banexpirynew'], 'adminid' => $member['adminid'], 'groupid' => $member['groupid']);
         $member['groupterms']['ext'][$groupidnew] = $_G['gp_banexpirynew'];
         $sql .= ', groupexpiry=\'' . groupexpiry($member['groupterms']) . '\'';
     } else {
         $sql .= ', groupexpiry=0';
     }
     $adminidnew = -1;
     $my_data['expiry'] = groupexpiry($member['groupterms']);
     DB::delete('forum_postcomment', "authorid='{$member['uid']}' AND rpid>'0'");
 } elseif ($member['groupid'] == 4 || $member['groupid'] == 5) {
     if (!empty($member['groupterms']['main']['groupid'])) {
         $groupidnew = $member['groupterms']['main']['groupid'];
         $adminidnew = $member['groupterms']['main']['adminid'];
         unset($member['groupterms']['main']);
         unset($member['groupterms']['ext'][$member['groupid']]);
         $sql .= ', groupexpiry=\'' . groupexpiry($member['groupterms']) . '\'';
     }
     $groupidnew = DB::result_first("SELECT groupid FROM " . DB::table('common_usergroup') . " WHERE type='member' AND creditshigher<='{$member['credits']}' AND creditslower>'{$member['credits']}'");
     $adminidnew = 0;
 } else {
     $update = false;
     $groupidnew = $member['groupid'];
     $adminidnew = $member['adminid'];
     if (in_array('avatar', $_G['gp_clear'])) {
         $sql .= ', avatarstatus=\'0\'';
         loaducenter();
         uc_user_deleteavatar($member['uid']);
     }
 }
 if (!empty($my_data) && !empty($mylogtype)) {
     my_thread_log($mylogtype, $my_data);
开发者ID:dalinhuang,项目名称:hlwbbsvincent,代码行数:31,代码来源:admincp_members.php

示例4: VALUES

            DB::query("INSERT INTO " . DB::table('forum_warning') . " (pid, operatorid, operator, authorid, author, dateline, reason) VALUES ('{$post['pid']}', '{$_G['uid']}', '{$_G['username']}', '{$post['authorid']}', '" . addslashes($post['author']) . "', '{$_G['timestamp']}', '{$reason}')", 'UNBUFFERED');
            $authorwarnings = DB::result_first("SELECT COUNT(*) FROM " . DB::table('forum_warning') . " WHERE authorid='{$post['authorid']}' AND dateline>={$_G['timestamp']}-" . $_G[setting][warningexpiration] * 86400);
            if ($authorwarnings >= $_G['setting']['warninglimit']) {
                $member = DB::fetch_first("SELECT adminid, groupid, extgroupids FROM " . DB::table('common_member') . " WHERE uid='{$post['authorid']}'");
                $groupterms = unserialize(DB::result_first("SELECT groupterms FROM " . DB::table('common_member_field_forum') . " WHERE uid='{$post['authorid']}'"));
                if ($member && $member['groupid'] != 4) {
                    $extgroupidsarray = array();
                    foreach (array_unique(array_merge($member['extgroupids'], array(4))) as $extgroupid) {
                        if ($extgroupid) {
                            $extgroupidsarray[] = $extgroupid;
                        }
                    }
                    $extgroupidsnew = implode("\t", $extgroupidsarray);
                    $banexpiry = TIMESTAMP + $_G['setting']['warningexpiration'] * 86400;
                    $groupterms['ext'][4] = $banexpiry;
                    DB::query("UPDATE " . DB::table('common_member') . " SET groupid='4', groupexpiry='" . groupexpiry($groupterms) . "' WHERE uid='{$post['authorid']}'");
                    DB::query("UPDATE " . DB::table('common_member_field_forum') . " SET groupterms='" . addslashes(serialize($groupterms)) . "' WHERE uid='{$post['authorid']}'");
                }
            }
            $pids .= $comma . $post['pid'];
            $comma = ',';
        } elseif (!$warned && $post['status'] & 2) {
            my_post_log('unwarn', array('pid' => $post['pid'], 'uid' => $post['authorid']));
            DB::query("UPDATE " . DB::table($posttable) . " SET status=status^2 WHERE pid='{$post['pid']}' AND status=status|2", 'UNBUFFERED');
            DB::query("DELETE FROM " . DB::table('forum_warning') . " WHERE pid='{$post['pid']}'", 'UNBUFFERED');
            $pids .= $comma . $post['pid'];
            $comma = ',';
        }
    }
    $resultarray = array('redirect' => "forum.php?mod=viewthread&tid={$_G['tid']}&page={$page}", 'reasonpm' => $sendreasonpm ? array('data' => $posts, 'var' => 'post', 'item' => 'reason_warn_post') : array(), 'reasonvar' => array('tid' => $thread['tid'], 'subject' => $thread['subject'], 'modaction' => $modaction, 'reason' => stripslashes($reason), 'warningexpiration' => $_G['setting']['warningexpiration'], 'warninglimit' => $_G['setting']['warninglimit'], 'warningexpiration' => $_G['setting']['warningexpiration'], 'authorwarnings' => $authorwarnings), 'modtids' => 0, 'modlog' => $thread);
}
开发者ID:pan289091315,项目名称:Discuz,代码行数:31,代码来源:topicadmin_warn.php

示例5: cutstr

		$pids = $comma = '';
		foreach($posts as $k => $post) {
			if($post['adminid'] == 0) {
				if($warned && !($post['status'] & 2)) {
					$db->query("UPDATE {$tablepre}posts SET status=status|2 WHERE pid='$post[pid]'", 'UNBUFFERED');
					$reason = cutstr(dhtmlspecialchars($reason), 40);
					$db->query("INSERT INTO {$tablepre}warnings (pid, operatorid, operator, authorid, author, dateline, reason) VALUES ('$post[pid]', '$discuz_uid', '$discuz_user', '$post[authorid]', '".addslashes($post['author'])."', '$timestamp', '$reason')", 'UNBUFFERED');
					$authorwarnings = $db->result_first("SELECT COUNT(*) FROM {$tablepre}warnings WHERE authorid='$post[authorid]' AND dateline>=$timestamp-$warningexpiration*86400");
					if($authorwarnings >= $warninglimit) {
						$member = $db->fetch_first("SELECT adminid, groupid FROM {$tablepre}members WHERE uid='$post[authorid]'");
						if($member && $member['groupid'] != 4) {
							$banexpiry = $timestamp + $warningexpiration * 86400;
							$groupterms = array();
							$groupterms['main'] = array('time' => $banexpiry, 'adminid' => $member['adminid'], 'groupid' => $member['groupid']);
							$groupterms['ext'][4] = $banexpiry;
					  		$db->query("UPDATE {$tablepre}members SET groupid='4', groupexpiry='".groupexpiry($groupterms)."' WHERE uid='$post[authorid]'");
					  		$db->query("UPDATE {$tablepre}memberfields SET groupterms='".addslashes(serialize($groupterms))."' WHERE uid='$post[authorid]'");
					  	}
					}
					$pids .= $comma.$post['pid'];
					$comma = ',';
				} elseif(!$warned && ($post['status'] & 2)) {
					$db->query("UPDATE {$tablepre}posts SET status=status^2 WHERE pid='$post[pid]' AND status=status|2", 'UNBUFFERED');
					$db->query("DELETE FROM {$tablepre}warnings WHERE pid='$post[pid]'", 'UNBUFFERED');
					$pids .= $comma.$post['pid'];
					$comma = ',';
				}
			}
		}

		$resultarray = array(
开发者ID:BGCX262,项目名称:zyyhong-svn-to-git,代码行数:31,代码来源:topicadmin.php

示例6: getuserbyuid

            if ($authorwarnings >= $_G['setting']['warninglimit']) {
                $member = getuserbyuid($post[authorid]);
                $memberfieldforum = C::t('common_member_field_forum')->fetch($post[authorid]);
                $groupterms = dunserialize($memberfieldforum['groupterms']);
                unset($memberfieldforum);
                if ($member && $member['groupid'] != 4) {
                    $extgroupidsarray = array();
                    foreach (array_unique(array_merge($member['extgroupids'], array(4))) as $extgroupid) {
                        if ($extgroupid) {
                            $extgroupidsarray[] = $extgroupid;
                        }
                    }
                    $extgroupidsnew = implode("\t", $extgroupidsarray);
                    $banexpiry = TIMESTAMP + $_G['setting']['warningexpiration'] * 86400;
                    $groupterms['ext'][4] = $banexpiry;
                    C::t('common_member')->update($post['authorid'], array('groupid' => 4, 'groupexpiry' => groupexpiry($groupterms)));
                    C::t('common_member_field_forum')->update($post['authorid'], array('groupterms' => serialize($groupterms)));
                }
            }
            $pids .= $comma . $post['pid'];
            $comma = ',';
            crime('recordaction', $post['authorid'], 'crime_warnpost', lang('forum/misc', 'crime_postreason', array('reason' => $reason, 'tid' => $_G['tid'], 'pid' => $post['pid'])));
        } elseif (!$warned && $post['status'] & 2) {
            C::t('forum_post')->increase_status_by_pid('tid:' . $_G['tid'], $post['pid'], 2, '^', true);
            C::t('forum_warning')->delete_by_pid($post['pid']);
            $pids .= $comma . $post['pid'];
            $comma = ',';
        }
    }
    $resultarray = array('redirect' => "forum.php?mod=viewthread&tid={$_G['tid']}&page={$page}", 'reasonpm' => $sendreasonpm ? array('data' => $posts, 'var' => 'post', 'item' => 'reason_warn_post', 'notictype' => 'post') : array(), 'reasonvar' => array('tid' => $thread['tid'], 'subject' => $thread['subject'], 'modaction' => $modaction, 'reason' => $reason, 'warningexpiration' => $_G['setting']['warningexpiration'], 'warninglimit' => $_G['setting']['warninglimit'], 'warningexpiration' => $_G['setting']['warningexpiration'], 'authorwarnings' => $authorwarnings), 'modtids' => 0, 'modlog' => $thread);
}
开发者ID:MCHacker,项目名称:discuz-docker,代码行数:31,代码来源:topicadmin_warn.php

示例7: _handleBandUser

 protected function _handleBandUser($user, $days = 1)
 {
     $uid = $user['uid'];
     if ($this->_checkUserIgnore($uid)) {
         return false;
     }
     require_once libfile('function/forum');
     $setarr = array('groupid' => 4);
     if ($days) {
         $days = !empty($days) ? TIMESTAMP + $days * 86400 : 0;
         $days = $days > TIMESTAMP ? $days : 0;
         if ($days) {
             $user['groupterms']['main'] = array('time' => $days, 'adminid' => $user['adminid'], 'groupid' => $user['groupid']);
             $user['groupterms']['ext'][4] = $days;
             C::t('common_member_field_forum')->update($uid, array('groupterms' => serialize($user['groupterms'])));
             $setarr['groupexpiry'] = groupexpiry($user['groupterms']);
         } else {
             $setarr['groupexpiry'] = 0;
         }
     }
     require_once libfile('function/misc');
     return C::t('common_member')->update($uid, $setarr);
 }
开发者ID:MCHacker,项目名称:discuz-docker,代码行数:23,代码来源:Security.php


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