if ($type == "image/jpeg") { $name = $comp_Id . ".jpg"; } else { if ($type == "image/png") { $name = $comp_Id . ".png"; } else { if ($type == "image/pjpeg") { $name = $comp_Id . ".jpg"; } else { if ($type == "image/bmp") { $name = $comp_Id . ".bmp"; } } } } } // Edit upload location here $destination_path = 'files/c_logos/'; $target_path = $destination_path . $name; $Thumb_Path = $destination_path . 'thumbs/' . $name; if (@move_uploaded_file($_FILES['c_logo']['tmp_name'], $target_path)) { $result = 1; setAppVariable('comp_Logo', $name); } } } header("Location:company_info.php?res={$result}"); ?>
public function updateDiskSpace($size) { $existing = getAppVariable('disk_Space'); $new_size = (int) $existing + $size; return setAppVariable('disk_Space', $new_size); }