Пример #1
0
     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);
 } elseif (strpos($_POST['user_photo_id'], 'event_date') === 0) {
     $update['photo_id'] = str_replace('event_date-', '', $_POST['user_photo_id']);
     $update['photo_title'] = $_POST['title'];
     //echo 'editing caption: ';
     echo $photos->updatePhotoDate($update);
 } elseif (strpos($_POST['user_photo_id'], 'type') === 0) {
     $update['photo_id'] = str_replace('type-', '', $_POST['user_photo_id']);
     $update['photo_title'] = $_POST['title'];
     //echo 'editing type: ';
     echo $photos->updatePhotoType($update);
 } elseif (strpos($_POST['user_photo_id'], 'price') === 0) {
     $update['photo_id'] = str_replace('price-', '', $_POST['user_photo_id']);
     $update['photo_title'] = $_POST['title'];
     //echo 'editing type: ';
     echo $photos->updatePhotoPrice($update);
 } else {
     echo 'nothing going on ';
 }
 // paypal_url
 //echo 'The photo: '.$update['photo_id'].' will be updated to '.$update['photo_title'];