${'ifcheckstyle_' . $space['spacestyle']} = ' checked'; ${'spacestyle_' . $space['spacestyle']} = 'class="current"'; $maxuploadsize = ini_get('upload_max_filesize'); //$privacy = $newSpace->getPrivacy(); !$o_uskin && ($o_uskin = array('default85' => 'default85')); $space['namelength'] = strlen($space['name']); $space['desclength'] = strlen($space['descript']); require_once uTemplate::printEot('space_set'); pwOutPut(); } else { S::gp(array('name', 'spaceskin', 'domain', 'descript')); S::gp(array('spacestyle', 'spacetype', 'ifopen', 'privacy', 'shownum'), 'GP', 2); if (strlen(pwHtmlspecialchars_decode($title)) > 80) { Showmsg('space_name_toolong'); } if (strlen(pwHtmlspecialchars_decode($title)) > 255) { Showmsg('space_descript_toolong'); } $modelset = array(); $layout = ""; if (intval($space['spacetype']) == $spacetype) { foreach ($spaceModel as $key => $value) { (!$shownum[$value] || $shownum[$value] < 1) && ($shownum[$value] = 1); if ($shownum[$value] > 30) { Showmsg($lang_model[$value][0] . '模块展示条目请不要超过30!'); } $modelset[$value] = array('ifopen' => intval($ifopen[$value]), 'num' => $shownum[$value]); } } else { switch ($spacetype) { case '0':
function setTags($tags) { if (!$tags) { return ''; } $tags = pwHtmlspecialchars_decode($tags); $tags = stripslashes($tags); $tags = function_exists('mb_eregi_replace') ? mb_eregi_replace('/[“|”]/', '"', $tags) : str_replace(array('“', '”'), '"', $tags); $tags = preg_replace_callback('/("[^"]+")/', array($this, 'callback'), $tags); $this->tags = array_merge($this->tags, explode(" ", str_replace('/\\s+/is', ' ', trim($tags)))); $this->tags = array_unique($this->tags); if (count($this->tags) > 5) { return $this->post->showmsg("tags_num_limit"); } foreach ($this->tags as $key => $value) { $this->tags[$key] = trim(preg_replace('/ /is', ' ', $this->tags[$key])); if (!$this->tags[$key]) { unset($this->tags[$key]); continue; } if (strlen($this->tags[$key]) > 15 || strlen($this->tags[$key]) < 3) { return $this->post->showmsg('tag_length_limit'); } } return implode(" ", $this->tags); }
Showmsg('undefined_action'); } } elseif ($a == 'postboard') { require_once R_P . 'require/postfunc.php'; banUser(); S::gp(array('uid', 'title'), 'P'); $title = str_replace('=', '=', $title); $uid = (int) $uid; if (!$uid) { Showmsg('undefined_action'); } if ($uid == $winduid) { Showmsg('mode_o_board_self'); } // if (!isFriend($uid,$winduid)) Showmsg('mode_o_board_not_friend'); //去掉非好友不能留言 if (strlen(pwHtmlspecialchars_decode($title)) > 3 && strlen(pwHtmlspecialchars_decode($title)) > 200) { Showmsg('mode_o_board_too_lang'); } $userService = L::loadClass('UserService', 'user'); /* @var $userService PW_UserService */ $tousername = $userService->getUserNameByUserId($uid); if (!$tousername) { Showmsg('undefined_action'); } require_once R_P . 'require/bbscode.php'; $wordsfb = L::loadClass('FilterUtil', 'filter'); if (($banword = $wordsfb->comprise($title, false)) !== false) { Showmsg('title_wordsfb'); } $data = array('uid' => $winduid, 'username' => $windid, 'touid' => $uid, 'title' => $title, 'postdate' => $timestamp, 'ifwordsfb' => $wordsfb->ifwordsfb(stripslashes($title))); $db->update("INSERT INTO pw_oboard SET " . S::sqlSingle($data));
} initJob($winduid, 'doAddFriend'); $jobService = L::loadclass('job', 'job'); $jobs = $jobService->getJobByJobName('doAddFriend'); foreach ($jobs as $value) { if (isset($value['isuserguide']) && !$value['isuserguide']) { continue; } $job['id'] = $value['id']; } $jobService->jobGainController($winduid, $job['id']); ObHeader("{$db_registerfile}?step=finish&option=4&verify={$verifyhash}"); } } elseif ($option == '4') { //精彩推荐 $rg_recommendcontent = pwHtmlspecialchars_decode($rg_config['rg_recommendcontent']); //可能感兴趣的内容~最新图酷帖->最新帖 $threadsService = L::loadClass('threads', 'forum'); /* @var $threadsService PW_Threads */ $latestImageThreads = $threadsService->getLatestImageThreads(7); foreach ($latestImageThreads as $k => $v) { //$recommendContent['attachurl'] = $a_url = geturl($v['attachurl'], 'show', 1); $latestImageThreads[$k]['subject'] = substrs($v[subject], 12); $latestImageThreads[$k]['thumb'] = getMiniUrl($v['attachurl'], $v['ifthumb'], $a_url[1]); //url $latestImageThreads[$k]['url'] = "read.php?tid={$v['tid']}"; $db_htmifopen && ($latestImageThreads[$k]['url'] = urlRewrite($latestImageThreads[$k]['url'])); //thumb !$latestImageThreads[$k]['thumb'] && ($latestImageThreads[$k]['thumb'] = 'images/defaultactive.jpg'); }
/** * 解析内容 * @param string $content 新鲜事内容 * @param array $extra 扩展信息 * return string */ function parseContent($content, &$extra) { global $topic; $this->_hasVideo = array(); $content = $this->_parseLink($content); if ($this->_hasVideo) { $extra['_hasVideo'] = $this->_hasVideo; } if ($extra['refer']) { $uArray = array_flip($extra['refer']); $content = preg_replace('/@([^\\&\'"\\/\\*,<>\\r\\t\\n\\s#%?@::]+)(?=\\s?)/ie', "\$this->_parseRefer('\\1', \$uArray)", $content); } if ($extra['topics']) { $content = pwHtmlspecialchars_decode($content, false); if (preg_match('/^#\\s+#$/', $content)) { return $content; } $content = preg_replace_callback('/#([^@&#!*\\(\\)]+)#/U', array(&$this, '_callback_add_topic_url'), $content); } if (strpos($content, '[s:') !== false && strpos($content, ']') !== false) { $content = $this->_parseSmile($content); } if ($topic && !$extra['topics']) { $content = strip_tags($content); $content = preg_replace('/' . preg_quote($topic, '/') . '/i', "<span class='s2'>{$topic}</span>", $content); } return $content; }
function addCheck($content, $groupid) { if ($groupid == '6') { return '您已被禁言!'; } if (!$content) { return '内容不为空'; } if (strlen(pwHtmlspecialchars_decode($content)) > 255) { return '内容不能多于255字节'; } $filterService = L::loadClass('FilterUtil', 'filter'); if (($GLOBALS['banword'] = $filterService->comprise($content)) !== false) { return 'content_wordsfb'; } return true; }
foreach ($tempExistsUsernames as $value) { $existsUsernames[] = $value['username']; $reg['recommendids'][] = $value['uid']; } $difference = array_diff($reg['recommendnames'], $existsUsernames); if (S::isArray($difference)) { $diffStr = implode(',', $difference) . '不存在'; adminmsg($diffStr, $basename . '&adminitem=guide'); } } $reg['recommendcontent'] = trim($reg['recommendcontent']); saveConfig(); adminmsg('operate_success', $basename . '&adminitem=guide'); } elseif ($action == 'preview') { S::gp(array('reg')); $recommendcontent = pwHtmlspecialchars_decode(stripslashes($reg['recommendcontent'])); //可能感兴趣的内容~最新图酷帖->最新帖 $threadsService = L::loadClass('threads', 'forum'); /* @var $threadsService PW_Threads */ $latestImageThreads = $threadsService->getLatestImageThreads(7); foreach ($latestImageThreads as $k => $v) { //$recommendContent['attachurl'] = $a_url = geturl($v['attachurl'], 'show', 1); $latestImageThreads[$k]['thumb'] = getMiniUrl($v['attachurl'], $v['ifthumb'], $a_url[1]); //url $latestImageThreads[$k]['url'] = "read.php?tid={$v['tid']}"; $db_htmifopen && ($latestImageThreads[$k]['url'] = urlRewrite($latestImageThreads[$k]['url'])); //thumb !$latestImageThreads[$k]['thumb'] && ($latestImageThreads[$k]['thumb'] = 'images/defaultactive.jpg'); } include PrintEot('customfield');