if (!$multiset) { $_G['gp_multinew'] = array(0 => array('single' => 1)); } foreach ($_G['gp_multinew'] as $k => $row) { if (empty($row['single'])) { foreach ($row as $key => $value) { $_G['gp_' . $key] = $value; } $fid = $_G['gp_multi'][$k]; } $forum = $mforum[$k]; if (strlen($_G['gp_namenew']) > 50) { cpmsg('forums_name_toolong', '', 'error'); } if (!$multiset) { if (!checkformulaperm($_G['gp_formulapermnew'])) { cpmsg('forums_formulaperm_error', '', 'error'); } $formulapermary[0] = $_G['gp_formulapermnew']; $formulapermary[1] = preg_replace(array("/(digestposts|posts|threads|extcredits[1-8])/", "/(regdate|regday|regip|lastip|buyercredit|sellercredit|field\\d+)/"), array("getuserprofile('\\1')", "\$memberformula['\\1']"), $_G['gp_formulapermnew']); $formulapermary['message'] = $_G['gp_formulapermmessagenew']; } else { $formulapermary = unserialize($forum['formulaperm']); } $formulapermary['medal'] = $_G['gp_medalnew']; $formulapermary['users'] = $_G['gp_formulapermusersnew']; $_G['gp_formulapermnew'] = addslashes(serialize($formulapermary)); if ($_G['gp_type'] == 'group') { if ($_G['gp_namenew']) { $forumcolumnsnew = $_G['gp_forumcolumnsnew'] > 1 ? intval($_G['gp_forumcolumnsnew']) : 0; DB::update('forum_forum', array('name' => $_G['gp_namenew'], 'forumcolumns' => $forumcolumnsnew, 'status' => intval($_G['gp_statusnew'])), "fid='{$fid}'");
} $pluginvars = array(); require_once libfile('function/delete'); foreach ($_GET['multinew'] as $k => $row) { if (empty($row['single'])) { foreach ($row as $key => $value) { $_GET['' . $key] = $value; } $fid = $_GET['multi'][$k]; } $forum = $mforum[$k]; if (strlen($_GET['namenew']) > 50) { cpmsg('forums_name_toolong', '', 'error'); } if (!$multiset) { if (!checkformulaperm($_GET['formulapermnew'])) { cpmsg('forums_formulaperm_error', '', 'error'); } $formulapermary[0] = $_GET['formulapermnew']; $formulapermary[1] = preg_replace(array("/(digestposts|posts|threads|oltime|extcredits[1-8])/", "/(regdate|regday|regip|lastip|buyercredit|sellercredit|field\\d+)/"), array("getuserprofile('\\1')", "\$memberformula['\\1']"), $_GET['formulapermnew']); $formulapermary['message'] = $_GET['formulapermmessagenew']; } else { $formulapermary = dunserialize($forum['formulaperm']); } $formulapermary['medal'] = $_GET['medalnew']; $formulapermary['users'] = $_GET['formulapermusersnew']; $_GET['formulapermnew'] = serialize($formulapermary); $domain = ''; if (!empty($_GET['domainnew']) && !empty($_G['setting']['domain']['root']['forum'])) { $domain = strtolower(trim($_GET['domainnew'])); }
function admincp_check() { global $_G, $formulapermary; if (!checkformulaperm($_G['gp_formulapermnew'])) { cpmsg('forums_formulaperm_error', '', 'error'); } $formulapermary[0] = $_G['gp_formulapermnew']; $formulapermary[1] = preg_replace("/(digestposts|posts|threads|oltime|extcredits[1-8])/", "getuserprofile('\\1')", $_G['gp_formulapermnew']); }