$value) { if ( strlen(stristr($_GET[$key],'?'))=='1' ) { $_GET[$key]=substr($_GET[$key],0,(strlen($_GET[$key])-1)); } } //print_r($_GET); /* // End of the code to filter query string */ if ( isset( $_GET['action'] ) ) { if (strpos($_GET['action'],'?')) { $_GET['action']=substr($_GET['action'],0,(strlen($_GET['action'])-1)); } else { $_GET['action']=$_GET['action']; } switch ( $action = trim($_GET['action']) ) { case 'premium_comment' : if ( isset($_SESSION['QIXIT_POST_COMMENTS_DATA']) ) { $_SESSION['QIXIT_POST_COMMENTS_DATA']['qixit_id']=( isset($_GET['qixit_id']) )?$_GET['qixit_id']:''; } ?> insert( $wpdb->prefix.QIXIT_PAYMENT_DETAILS, array( 'product_id' => 0, // we do not have a qixit product record for this type of QIXIT product 'qixit_PID' => $qixit_settings['qixit_admin_product_for_registration'], 'qixit_id' => $_GET['qixit_id'], 'total' => $qixit_settings['cost_to_be_author'], 'payment_for' => 'author_registration', 'wp_user_id' => $user_id, 'date_purchased' => date('Y-m-d H:i:s') )); // insert data into author settings $wpdb->insert( $wpdb->prefix.QIXIT_AUTHOR_SETTINGS, array( 'wp_user_id' => $user_id, 'qixit_id' => $_GET['qixit_id'], 'date_created' => date('Y-m-d H:i:s') )); // notify user wp_new_user_notification($user_id, $user_pass); unset($_SESSION['AUTHOR_REGISTRATION']); $_SESSION['AUTO_LOGIN']['log']=$user_login; $_SESSION['AUTO_LOGIN']['pwd']=$user_pass; if (version_compare($wp_version, '3.0') >= 0) { update_user_meta( $user_id, 'wp_user_level','2'); update_user_meta( $user_id, 'wp_capabilities',array('author'=>'1')); } else { update_usermeta( $user_id, 'wp_user_level','2'); update_usermeta( $user_id, 'wp_capabilities',array('author'=>'1')); } ?> insert( $wpdb->prefix.QIXIT_PAYMENT_DETAILS, array('product_id' => $qixit_product->get_product_id(), 'qixit_PID' => $qixit_settings['qixit_admin_product_for_author_post_publish'], 'qixit_id' => $_GET['qixit_id'], 'total' => $qixit_settings['cost_to_publish_post_by_author'], 'payment_for' => 'add_post', 'date_purchased' => date('Y-m-d H:i:s') )); // insert/update product in qixit products qixit_author_post_product_add($_SESSION['POST_ID']); $author_info=qixit_get_author_settings($current_user->ID); if ( $author_info->qixit_id != $_GET['qixit_id'] ) { qixit_author_post_publish_wrong_creator_notification($_SESSION['POST_ID'],$_GET['qixit_id']); } else { qixit_author_post_publish_notification($_SESSION['POST_ID'],$_GET['qixit_id']); } $post = array(); $post['ID'] = $_SESSION['POST_ID']; $post['post_status'] = 'publish'; wp_update_post( $post ); unset($_SESSION['POST_ID']); //close the popup window and take the user back to the post edit page echo ""; die(' '); break; default : die(' '); break; }// End of switch } else { ?>