$_SESSION['insert_artist'] = 'insert';
        } else {
            $_SESSION['insert_artist'] = 'insert_faild';
        }
    } else {
        $action = 'updated';
        $arrData['id'] = $_POST['id'];
        $arrData['coverimg'] = 'artistcover_' . $_POST['id'] . '.jpg';
        $arrData['picture'] = 'artistpic_' . $_POST['id'] . '.jpg';
        if ($_FILES['artist_cover']['name'] != '') {
            $logo = 'artistcover_' . $arrData['id'] . '.jpg';
            saveResizeImage($_FILES['artist_cover'], $arrData['id'], 'artistcover');
        }
        if ($_FILES['artist_picture']['name'] != '') {
            $picture = 'artistpic_' . $arrData['id'] . '.jpg';
            saveResizeImage($_FILES['artist_picture'], $arrData['id'], 'artistpic');
        }
        if ($_FILES['artist_picture1']['name'] != '') {
            $picture = 'artistpic1_' . $arrData['id'] . '.jpg';
            saveResizeImage($_FILES['artist_picture1'], $arrData['id'], 'artistpic1');
        }
        if ($_FILES['artist_picture2']['name'] != '') {
            $picture = 'artistpic2_' . $arrData['id'] . '.jpg';
            saveResizeImage($_FILES['artist_picture2'], $arrData['id'], 'artistpic2');
        }
        $artist->del_prop($arrData['id'], 'artist');
        $artist->add_prop($artist_prop, $arrData['id'], 'artist');
        $update = $artist->edit($arrData);
    }
}
header('Location: artist.php?act=' . $action);