Beispiel #1
0
    } else {
        flash();
    }
}
if (isset($_POST['saveregister'])) {
    $updated = false;
    if (isset($_POST['data']['setting']['register_type']) && $_POST['data']['setting']['register_type'] != "close_register") {
        if (!empty($_POST['data']['setting']['reg_filename']) && !pb_strcomp($_POST['data']['setting']['reg_filename'], $_POST['data']['reg_filename'])) {
            $renameResult = rename(PHPB2B_ROOT . 'register.php', PHPB2B_ROOT . $_POST['data']['setting']['reg_filename']);
        }
        if (!empty($_POST['data']['setting']['post_filename']) && !pb_strcomp($_POST['data']['setting']['post_filename'], $_POST['data']['post_filename'])) {
            $renameResult = rename(PHPB2B_ROOT . 'post.php', PHPB2B_ROOT . $_POST['data']['setting']['post_filename']);
        }
    }
    if (!empty($_POST['data']['forbid_ip'])) {
        $datas = $string->txt2array($_POST['data']['forbid_ip']);
        if (!empty($datas)) {
            foreach ($datas as $val) {
                list($ip1, $ip2, $ip3, $ip4) = explode(".", $val);
                $tmp_ip[] = "('" . $ip1 . "','" . $ip2 . "','" . $ip3 . "','" . $ip4 . "')";
            }
            $values = implode(",", $tmp_ip);
            if (!empty($tmp_ip)) {
                $pdb->Execute("INSERT INTO {$tb_prefix}banned (ip1,ip2,ip3,ip4) VALUES " . $values);
            }
        }
    }
    if (!empty($_POST['data']['forbid_word'])) {
        $datas = $string->txt2array($_POST['data']['forbid_word']);
        if (!empty($datas)) {
            $cache->writeCache("words", "words", "\$_PB_CACHE['words'] = " . $cache->evalArray($datas));