Changeset 186197
- Timestamp:
- 12/22/2009 05:36:00 PM (16 years ago)
- File:
-
- 1 edited
-
are-paypal/trunk/are-paypal-ipn.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
are-paypal/trunk/are-paypal-ipn.php
r163742 r186197 206 206 $items = $wpdb->get_results("SELECT * FROM . $appcfg->paied_items_table WHERE post_id='$post_id'"); 207 207 $expire=''; 208 $expiration_unit = 'D'; 208 209 if ($items){ 209 210 $expire=$items[0]->expire; 211 $expiration_unit = $items[0]->expiration_unit; 210 212 } 211 213 if ($post_id=="-1"){ 212 $expire=get_option($appcfg->prefix.'_BlogExpire'); 213 } 214 $wpdb->query("INSERT INTO $appcfg->paied_users_table(post_id,user_id,expire) VALUES('$post_id','$user_id','$expire')"); 214 $expire = get_option($appcfg->prefix.'_BlogExpire'); 215 $expiration_unit = get_option($appcfg->prefix.'_BlogExpirationUnits'); 216 } 217 $wpdb->query("INSERT INTO $appcfg->paied_users_table(post_id,user_id,expire,expiration_unit) VALUES('$post_id','$user_id','$expire','$expiration_unit')"); 215 218 $bonuses = $wpdb->get_results("SELECT post2_id FROM . $appcfg->bonus_posts_table WHERE post1_id='$post_id'"); 216 219 foreach($bonuses as $bonus) {
Note: See TracChangeset
for help on using the changeset viewer.