$new_options[$k][$key] = isset($_POST["opt_{$k}"][$key]) && $_POST["opt_{$k}"][$key] ? floor($_POST["opt_{$k}"][$key]) : 0; } else { $new_options[$k][$key] = isset($_POST["opt_{$k}"][$key]) && $_POST["opt_{$k}"][$key] ? stripslashes($_POST["opt_{$k}"][$key]) : ''; } } } else { continue; } } elseif (is_bool($options[$k])) { $new_options[$k] = isset($_POST['opt_' . $k]) && $_POST['opt_' . $k] ? true : false; } elseif (is_numeric($options[$k])) { /* //Check Numeric Field, if invalid or blank, give its default value. >> filterNumericFld($postname, $title, $defaultval) {} */ $_POST['opt_' . $k] = filterNumericFld('opt_' . $k, str_replace('_', ' ', $k), $options[$k]); $new_options[$k] = isset($_POST['opt_' . $k]) && $_POST['opt_' . $k] ? floor($_POST['opt_' . $k]) : 0; } else { if ($k == 'download_dir') { $_POST['opt_' . $k] = str_replace($baddir, '', $_POST['opt_' . $k]); while (strstr($_POST['opt_' . $k], "//")) { $_POST['opt_' . $k] = str_replace("//", "/", $_POST['opt_' . $k]); } if (substr($_POST['opt_' . $k], -1) != '/') { $_POST['opt_' . $k] .= '/'; } } elseif (substr($k, 0, 4) == 'work') { $_POST['opt_' . $k] = str_replace($badtime, '', $_POST['opt_' . $k]); } elseif (substr($k, 0, 4) == 'list') { $_POST['opt_' . $k] = str_replace($badip, '', $_POST['opt_' . $k]); } elseif (substr($k, 0, -3) == 'CID') {
$_POST['max_free_dl'] = filterNumericFld('max_free_dl', 'Leeching per ip', 5); $_POST['auto_delet'] = filterNumericFld('auto_delet', 'Auto deleting file', 0); $_POST['limitsize'] = filterNumericFld('limitsize', 'Maximum file size', 0); $_POST['lowlimitsize'] = filterNumericFld('lowlimitsize', 'Minimum file size', 0); $_POST['cpulimit'] = filterNumericFld('cpulimit', 'CPU Limit', 0); $_POST['serverjob'] = filterNumericFld('serverjob', 'Server Jobs', 5); $_POST['storage_limit'] = filterNumericFld('storage_limit', 'Storage Server File', 0); $_POST['pointbooster'] = filterNumericFld('pointbooster', 'Point booster', 0); $_POST['iframealocate'] = filterNumericFld('iframealocate', 'IFrame Allocation', 0); $_POST['auto_close'] = filterNumericFld('auto_close', 'Auto-close popup', 300); $_POST['max_trafic'] = filterNumericFld('max_trafic', 'Maximum Traffic', 0); $_POST['day_reset_trafic'] = filterNumericFld('day_reset_trafic', 'Auto Reset Traffic', 0); $_POST['audl'] = filterNumericFld('audl', 'Maximum Links Audl', 0); $_POST['auul'] = filterNumericFld('auul', 'Maximum Links Auul', 0); $_POST['dl_limit_max'] = filterNumericFld('dl_limit_max', 'Max Download per IP', 5); $_POST['dl_per_ip'] = filterNumericFld('dl_per_ip', 'Delay Download per IP', 3600); $_POST['language'] = is_numeric($_POST['language']) ? $_POST['language'] >= 0 && $_POST['language'] < count($arlang) ? $_POST['language'] : 0 : 0; function reListIP($ar_ipnya) { $c_ip = ''; if (count($ar_ipnya) > 0) { foreach ($ar_ipnya as $key => $value) { $c_ip .= "'" . trim($ar_ipnya[$key]) . "'"; $c_ip .= ", "; } $c_ip = substr($c_ip, 0, strlen($c_ip) - 2); } return $c_ip; } if (!empty($_POST['ip_list'])) { $list_ip_arr = explode(",", $_POST['ip_list']);