function initFileTypeInfo($db_uploadfiletype) { $uploadfiletype = $db_uploadfiletype ? unserialize($db_uploadfiletype) : array(); $attachAllow = pwJsonEncode($uploadfiletype); $imageAllow = pwJsonEncode(getAllowKeysFromArray($uploadfiletype, array('jpg', 'jpeg', 'gif', 'png', 'bmp'))); return array($attachAllow, $imageAllow); }
} empty($subtype) && ($subtype = 'groupsms'); $normalUrl = $baseUrl . "?type={$subtype}"; !empty($winduid) && ($userId = $winduid); S::gp(array('smstype', 'page'), 'GP'); !$page && ($page = 1); $selected_all = $selected_self = $selected_other = ''; $selected_all = $action == '' || $action == 'all' ? 'selected' : ''; $selected_self = $action == 'self' ? 'selected' : ''; $selected_other = $action == 'other' ? 'selected' : ''; $groupsmsCount = $groupsmsAllCount = (int) $messageServer->countAllGroupMessage($userId); $notReadCount = (int) $messageServer->countGroupMessagesNotRead($userId); //editer $uploadfiletype = $db_uploadfiletype ? unserialize($db_uploadfiletype) : array(); $attachAllow = pwJsonEncode($uploadfiletype); $imageAllow = pwJsonEncode(getAllowKeysFromArray($uploadfiletype, array('jpg', 'jpeg', 'gif', 'png', 'bmp'))); if (empty($action) || $action == 'all') { $pageCount = ceil($groupsmsCount / $perpage); $page = validatePage($page, $pageCount); $groupsmsList = $messageServer->getAllGroupMessages($userId, $page, $perpage); $url = "{$normalUrl}&"; !$groupsmsCount && ($emptyListTip = "暂无任何群消息"); } elseif ($action == 'unread') { $groupsmsCount = $notReadCount; $pageCount = ceil($groupsmsCount / $perpage); $page = validatePage($page, $pageCount); $groupsmsList = $messageServer->getGroupMessagesNotRead($userId, $page, $perpage); $url = "{$normalUrl}&action=unread&"; $pages = numofpage($groupsmsCount, $page, $pageCount, $url); !$notReadCount && ($emptyListTip = "暂无任何未读群消息"); } elseif ($action == 'self') {
function getAttachConfig() { global $db_uploadfiletype, $db_sellset, $db_enhideset, $pwforum, $_G; $conf = array(); $conf['attachAllow'] = pwJsonEncode($db_uploadfiletype); $conf['imageAllow'] = pwJsonEncode(getAllowKeysFromArray($db_uploadfiletype, array('jpg', 'jpeg', 'gif', 'png', 'bmp'))); $sellCredit = $enhideCredit = array(); empty($db_sellset['type']) && ($db_sellset['type'] = array('money')); empty($db_enhideset['type']) && ($db_enhideset['type'] = array('rvrc')); foreach ($db_sellset['type'] as $key => $value) { $sellCredit[$value] = pwCreditNames($value); } foreach ($db_enhideset['type'] as $key => $value) { $enhideCredit[$value] = pwCreditNames($value); } list($conf['sellCredit'], $conf['enhideCredit']) = array(pwJsonEncode($sellCredit), pwJsonEncode($enhideCredit)); $conf['htmlsell'] = $pwforum->foruminfo['allowsell'] && $_G['allowsell'] ? '' : 'disabled'; $conf['htmlhide'] = $pwforum->forumset['allowencode'] && $_G['allowencode'] ? '' : 'disabled'; return $conf; }