header('location:' . $from_url . ''); exit; } require_once ISVIPI_CLASSES_BASE . 'global/member_cls.php'; /*** CHANGE PROFILE PICTURE **/ if ($operation === 'prof_pic') { //check if an image is set if (!is_uploaded_file($_FILES['p_pic']['tmp_name'])) { $_SESSION['isv_error'] = 'Please select an image to upload.'; header('location:' . $from_url . ''); exit; } $image = $_FILES['p_pic']; /** change profile pic **/ $ppic = new member($_SESSION['isv_user_id']); $ppic->profile_pic($image); } /*** CHANGE COVER PICTURE **/ if ($operation === 'cover_pic') { //check if an image is set if (!is_uploaded_file($_FILES['cover']['tmp_name'])) { $_SESSION['isv_error'] = 'Please select an image to upload.'; header('location:' . $from_url . ''); exit; } $cover = $_FILES['cover']; /** change cover pic **/ $ppic = new member($_SESSION['isv_user_id']); $ppic->cover_photo($cover); } /*** EDIT PROFILE **/