Example #1
0
                //echo "it didnt";
                return false;
            }
        }
    }
}
// ------------------------------------------------------------ //
// 		Update Photos
// ------------------------------------------------------------ //
if ($_POST['user_photo_id']) {
    $photos = new Photos();
    if (strpos($_POST['user_photo_id'], 'title') === 0) {
        $update['photo_id'] = str_replace('title-', '', $_POST['user_photo_id']);
        $update['photo_title'] = $_POST['title'];
        //echo 'editing TITLE: ';
        echo $photos->updatePhotoTitle($update);
    } elseif (strpos($_POST['user_photo_id'], 'desc') === 0) {
        $update['photo_id'] = str_replace('desc-', '', $_POST['user_photo_id']);
        $update['photo_title'] = $_POST['title'];
        //echo 'editing description: ';
        echo $photos->updatePhotoDesc($update);
    } elseif (strpos($_POST['user_photo_id'], 'caption') === 0) {
        $update['photo_id'] = str_replace('caption-', '', $_POST['user_photo_id']);
        $update['photo_title'] = $_POST['title'];
        //echo 'editing description: ';
        echo $photos->updatePhotoCaption($update);
    } elseif (strpos($_POST['user_photo_id'], 'paypal_url') === 0) {
        $update['photo_id'] = str_replace('paypal_url-', '', $_POST['user_photo_id']);
        $update['photo_title'] = $_POST['title'];
        //echo 'editing caption: ';
        echo $photos->updatePhotoPaypal($update);