Example #1
0
 /**
  * Validate Post Data
  *
  * Validates that the POST data did not get dropped, this happens when
  * the content-length of the request is larger than PHP's post_max_size
  *
  *
  * @return	bool
  */
 public function validate_post_data()
 {
     ee()->load->helper('number_helper');
     $post_limit = get_bytes(ini_get('post_max_size'));
     return $_SERVER['CONTENT_LENGTH'] <= $post_limit;
 }
Example #2
0
$Donor = isset($_POST['Donor']) ? 1 : 0;
$Artist = isset($_POST['Artist']) ? 1 : 0;
$Visible = isset($_POST['Visible']) ? 1 : 0;
$Invites = (int) $_POST['Invites'];
$SupportFor = db_string($_POST['SupportFor']);
$Pass = db_string($_POST['ChangePassword']);
$Warned = isset($_POST['Warned']) ? 1 : 0;
$Logs095 = (int) $_POST['095logs'];
if (isset($_POST['Uploaded']) && isset($_POST['Downloaded'])) {
    $Uploaded = $_POST['Uploaded'] == "" ? 0 : $_POST['Uploaded'];
    if ($Arithmetic = strpbrk($Uploaded, '+-')) {
        $Uploaded += max(-$Uploaded, get_bytes($Arithmetic));
    }
    $Downloaded = $_POST['Downloaded'] == "" ? 0 : $_POST['Downloaded'];
    if ($Arithmetic = strpbrk($Downloaded, '+-')) {
        $Downloaded += max(-$Downloaded, get_bytes($Arithmetic));
    }
    if (!is_number($Uploaded) || !is_number($Downloaded)) {
        error(0);
    }
}
$WarnLength = (int) $_POST['WarnLength'];
$ExtendWarning = (int) $_POST['ExtendWarning'];
$WarnReason = $_POST['WarnReason'];
$UserReason = $_POST['UserReason'];
$DisableAvatar = isset($_POST['DisableAvatar']) ? 1 : 0;
$DisableInvites = isset($_POST['DisableInvites']) ? 1 : 0;
$DisablePosting = isset($_POST['DisablePosting']) ? 1 : 0;
$DisableForums = isset($_POST['DisableForums']) ? 1 : 0;
$DisableTagging = isset($_POST['DisableTagging']) ? 1 : 0;
$DisableUpload = isset($_POST['DisableUpload']) ? 1 : 0;
Example #3
0
 function get_ini_bytes($size)
 {
     return get_bytes($size, -1);
 }