Пример #1
0
        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'];
}
// ------------------------------------------------------------ //
// 		UPDATE LEADS SCRIPT
// ------------------------------------------------------------ //
if (isset($_POST['lead_script_id'])) {
    $leads = new Leads();
    if (strpos($_POST['lead_script_id'], 'lead-script') === 0) {
        $arr = explode('-', str_replace('lead-script-', '', $_POST['lead_script_id']));
        $update['table_col'] = $arr[0];
        $update['row_id'] = $arr[1];