<script type="text/javascript">
			window.location="<?php 
            echo $paypalAction_url . $querystring;
            ?>
";						
		</script>
	<?php 
        }
    }
}
/* check papal status */
if (isset($_GET['tx']) && isset($_GET['st'])) {
    extract($_GET);
    $st = trim($st);
    if ($st == "Completed") {
        changePoststatus($item_number, 'publish');
        // Update post status
        $_SESSION['success_mess'] = 1;
    }
    $lasttransid = $wpdb->get_row("select tid from {$payHistorytab} where postId = '{$item_number}' and payStatus = 'pending' ORDER BY tid DESC limit 0,1")->tid;
    $wpdb->query("update {$payHistorytab} set payStatus='{$st}', payAmt='{$amt}', postStatus='active', date='{$currentDate}' where postId='{$item_number}' and tid='{$lasttransid}'");
    ?>
	<script type="text/javascript">
	jQuery(document).ready(function(e) {
		jQuery('#mrclose-model').click(function(){
			jQuery("#confirmModal").removeClass('in');
			jQuery("#confirmModal").hide();
			jQuery("#confirmModal").after('');
			window.location="<?php 
    echo get_permalink($item_number);
    ?>
         }
         if (count($_POST['attachid']) > 1) {
             array_shift($_POST['attachid']);
             $attachimplode = implode(",", $_POST['attachid']);
             update_post_meta($insertBdirId, 'fg_temp_metadata', $attachimplode);
             update_post_meta($insertBdirId, 'fg_perm_metadata', $attachimplode);
         }
     }
     update_post_meta($insertBdirId, 'website', $websiteUrl);
     update_post_meta($insertBdirId, 'phone', $phoneNo);
     update_post_meta($insertAdId, 'emailaddress', $emailAddress);
     $locationArr = array('address' => trim($address), 'lat' => $addressLat, 'lng' => $addressLong);
     update_post_meta($insertBdirId, 'address', $locationArr);
     update_post_meta($insertBdirId, 'info', $info);
     update_post_meta($insertBdirId, 'stay_in_business_directory', $stay_in_business_directory);
     changePoststatus($insertBdirId, 'pending');
     //Update Budsiness status
     $_SESSION['success_mess'] = 'Ваш бизнес успешно добавлен в справочник, но находится на рассмотрении.';
 }
 //Insert data in trasection history
 $wpdb->query("insert into {$payHistorytab} set postId='{$insertBdirId}',activeDays='{$days}', payAmt='',userId='{$user_ID}',payStatus='pending',postType='business', postStatus='pending',date='{$currentDate}'");
 //PayPal settings
 $paypal_email = $mrPaypalsetting['paypalEmail'];
 $paypalAction_url = $paypalurl;
 $return_url = get_permalink(get_page_by_title("Business Directory Add"));
 $cancel_url = get_permalink(get_page_by_title("Cancel Business"));
 $notify_url = get_permalink(get_page_by_title("Business Directory Add"));
 $item_name = get_the_title($insertBdirId);
 if ($days) {
     $item_amount = "";
     for ($j = 0; $j < count($businessCostOptArr); $j++) {
Пример #3
0
         if (count($_POST['attachid']) > 1) {
             array_shift($_POST['attachid']);
             $attachimplode = implode(",", $_POST['attachid']);
             update_post_meta($insertAdId, 'fg_temp_metadata', $attachimplode);
             update_post_meta($insertAdId, 'fg_perm_metadata', $attachimplode);
         }
     }
     update_post_meta($insertAdId, 'price', $mr_Adprice);
     update_post_meta($insertAdId, 'web_site', $websiteUrl);
     update_post_meta($insertAdId, 'phone', $phoneNo);
     update_post_meta($insertAdId, 'emailaddress', $emailAddress);
     $locationArr = array('address' => trim($address), 'lat' => $addressLat, 'lng' => $addressLong);
     update_post_meta($insertAdId, 'location', $locationArr);
     update_post_meta($insertAdId, 'info', $info);
     update_post_meta($insertAdId, 'addays', $days);
     changePoststatus($insertAdId, 'pending');
     // Update post status
 }
 //Insert data in trasection history
 $wpdb->query("insert into {$payHistorytab} set postId='{$insertAdId}',activeDays='{$days}',\n\t\t\t\t\t\t\t\tpayAmt='',userId='{$user_ID}',payStatus='pending',postType='classified',\n\t\t\t\t\t\t\t\tpostStatus='pending',date='{$currentDate}'");
 //PayPal settings
 $paypal_email = $mrPaypalsetting['paypalEmail'];
 $paypalAction_url = $paypalurl;
 $return_url = get_permalink(get_page_by_title("Classified add"));
 $cancel_url = get_permalink(get_page_by_title("Cancel Classified"));
 $notify_url = get_permalink(get_page_by_title("Classified add"));
 $item_name = get_the_title($insertAdId);
 if ($days) {
     $item_amount = "";
     for ($i = 0; $i < count($adCostOptionsArr); $i++) {
         $postAdDays = $adCostOptionsArr[$i]['postAdDays'];
Пример #4
0
     $locationArr = array('address' => trim($location), 'lat' => $addressLat, 'lng' => $addressLong);
     update_post_meta($insertEventId, 'location', $locationArr);
     update_post_meta($insertEventId, 'event_info', $info);
     if (count($_POST['scDate']) > 0 && count($_POST['scMonth']) > 0) {
         for ($counter = 0; $counter < count($_POST['scDate']); $counter++) {
             update_post_meta($insertEventId, 'event_date_' . $counter, $_POST['scDate'][$counter]);
             update_post_meta($insertEventId, 'event_month_' . $counter, $_POST['scMonth'][$counter]);
             update_post_meta($insertEventId, 'evnt_time_start_hours_' . $counter, $_POST['evnt_time_start_hours'][$counter]);
             update_post_meta($insertEventId, 'evnt_time_start_minutes_' . $counter, $_POST['evnt_time_start_minutes'][$counter]);
             update_post_meta($insertEventId, 'event_start_time_' . $counter, $_POST['event_start_time'][$counter]);
             //update_post_meta($insertEventId,'evnt_time_end_hours_'.$counter, $_POST['evnt_time_end_hours'][$counter]);
             //update_post_meta($insertEventId,'evnt_time_end_minutes_'.$counter, $_POST['evnt_time_end_minutes'][$counter]);
             //update_post_meta($insertEventId,'evnt_end_time_'.$counter, $_POST['evnt_end_time'][$counter]);
         }
     }
     changePoststatus($insertEventId, 'pending');
     //Update post status
 }
 //Insert data in trasection history
 $wpdb->query("insert into {$payHistorytab} set postId='{$insertEventId}',activeDays='{$days}', payAmt='',userId='{$user_ID}',payStatus='pending',postType='event', postStatus='pending',date='{$currentDate}'");
 //PayPal settings
 $paypal_email = $mrPaypalsetting['paypalEmail'];
 $paypalAction_url = $paypalurl;
 $return_url = get_permalink(get_page_by_title("Event Add"));
 $cancel_url = get_permalink(get_page_by_title("Cancel Event"));
 $notify_url = get_permalink(get_page_by_title("Event Add"));
 $item_name = get_the_title($insertEventId);
 if ($days) {
     $item_amount = "";
     for ($j = 0; $j < count($eventCostOptArr); $j++) {
         $postEventDays = $eventCostOptArr[$j]['postEventDays'];