function censormod($message) { global $_G; if ($_G['group']['ignorecensor']) { return false; } $modposturl = false; if ($_G['group']['allowposturl'] == 1) { $urllist = get_url_list($message); if (is_array($urllist[1])) { foreach ($urllist[1] as $key => $val) { if (!($val = trim($val))) { continue; } if (!iswhitelist($val)) { $modposturl = true; } } } } if ($modposturl) { return true; } require_once libfile('class/censor'); $censor = discuz_censor::instance(); $censor->check($message); return $censor->modmoderated(); }
$polloptions = isset($polloptions) ? censor(trim($polloptions)) : ''; $readperm = isset($_G['gp_readperm']) ? intval($_G['gp_readperm']) : 0; $price = isset($_G['gp_price']) ? intval($_G['gp_price']) : 0; $_G['setting']['tagstatus'] = $_G['setting']['tagstatus'] && $_G['forum']['allowtag'] ? $_G['setting']['tagstatus'] == 2 ? 2 : $_G['forum']['allowtag'] : 0; if (empty($bbcodeoff) && !$_G['group']['allowhidecode'] && !empty($message) && preg_match("/\\[hide=?\\d*\\].+?\\[\\/hide\\]/is", preg_replace("/(\\[code\\](.+?)\\[\\/code\\])/is", ' ', $message))) { showmessage('post_hide_nopermission'); } if (periodscheck('postmodperiods', 0)) { $modnewthreads = $modnewreplies = 1; } else { $censormod = censormod($subject . "\t" . $message); $modnewthreads = (!$_G['group']['allowdirectpost'] || $_G['group']['allowdirectpost'] == 1) && $_G['forum']['modnewposts'] || $censormod ? 1 : 0; $modnewreplies = (!$_G['group']['allowdirectpost'] || $_G['group']['allowdirectpost'] == 2) && $_G['forum']['modnewposts'] == 2 || $censormod ? 1 : 0; } if ($_G['group']['allowposturl'] < 3 && $message) { $urllist = get_url_list($message); if (is_array($urllist[1])) { foreach ($urllist[1] as $key => $val) { if (!($val = trim($val))) { continue; } if (!iswhitelist($val)) { if ($_G['group']['allowposturl'] == 0) { showmessage('post_url_nopermission'); } elseif ($_G['group']['allowposturl'] == 1) { $modnewthreads = $modnewreplies = 1; break; } elseif ($_G['group']['allowposturl'] == 2) { $message = str_replace('[url]' . $urllist[0][$key] . '[/url]', $urllist[0][$key], $message); $message = preg_replace("@\\[url={$urllist[0][$key]}\\](.*?)\\[/url\\]@i", '\\1', $message); }
$weekDaysIndex[0] = '01'; $weekDaysIndex[1] = '02'; $weekDaysIndex[2] = '03'; $weekDaysEnglish[0] = '/friday/i'; $weekDaysEnglish[1] = '/saturday/i'; $weekDaysEnglish[2] = '/sunday/i'; //Loop through the list of urls foreach ($newUrls as $url) { //Make a new GET request for each url in the list plus "/" to get to the next level and add to array with data $getRequest = curl_get_request($url . "/"); array_push($dataSets, $getRequest); //If the current url is the first, url == calendar if ($url == $newUrls[0]) { if ($dom->loadHTML($dataSets[0])) { //Get list of links at calendar page (each person's calendar) $calendars = get_url_list($dom, $url . "/"); foreach ($calendars as $calendar) { //Match every calendar with the person and search for the available day if (preg_match('/paul/', $calendar)) { $paul = curl_get_request($calendar); if ($dom->loadHTML($paul)) { $paulsAvailableDays = find_available_days($dom); } else { die("Something went wrong"); } } else { if (preg_match('/peter/', $calendar)) { $peter = curl_get_request($calendar); if ($dom->loadHTML($peter)) { $petersAvailableDays = find_available_days($dom); } else {