Changeset 2447180
- Timestamp:
- 12/29/2020 05:47:29 AM (5 years ago)
- Location:
- apm-child/trunk
- Files:
-
- 4 edited
-
add-manual-commission.php (modified) (1 diff)
-
functions/core-function.php (modified) (6 diffs)
-
mc-main.php (modified) (1 diff)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
apm-child/trunk/add-manual-commission.php
r2262951 r2447180 19 19 20 20 $sql = $wpdb->prepare("INSERT INTO `".$wpdb->prefix."cso_my_income` 21 (`inc_caffitid`, `inc_cprodtype`, `inc_ccustname`, `inc_cprodtitle`, `inc_ctransamount`, `inc_commision_amt`, `inc_ctranspaymentmethod`, `inc_ctransreceipt`, `inc_processed`, `income_date`, `cron_status`, `inc_income_type` )22 VALUES(%s, %s, %s, %s, %s, %s, %s, %s, 'No', NOW(), 'Yes', 'Manual' )",23 array(addslashes_gpc(sanitize_text_field($_REQUEST['caffitid'])), addslashes_gpc(sanitize_text_field($_REQUEST['cprodtype'])), addslashes_gpc(sanitize_text_field($_REQUEST['ccustname'])), addslashes_gpc(sanitize_text_field($_REQUEST['cprodtitle'])), addslashes_gpc(sanitize_text_field($_REQUEST['ctransamount'])), addslashes_gpc(sanitize_text_field($_REQUEST['commission_amount'])), addslashes_gpc(sanitize_text_field($_REQUEST['ctranspaymentmethod'])), addslashes_gpc(sanitize_text_field($_REQUEST['ctransreceipt'])) ));21 (`inc_caffitid`, `inc_cprodtype`, `inc_ccustname`, `inc_cprodtitle`, `inc_ctransamount`, `inc_commision_amt`, `inc_ctranspaymentmethod`, `inc_ctransreceipt`, `inc_processed`, `income_date`, `cron_status`, `inc_income_type`, `income_date`) 22 VALUES(%s, %s, %s, %s, %s, %s, %s, %s, 'No', NOW(), 'Yes', 'Manual', %s)", 23 array(addslashes_gpc(sanitize_text_field($_REQUEST['caffitid'])), addslashes_gpc(sanitize_text_field($_REQUEST['cprodtype'])), addslashes_gpc(sanitize_text_field($_REQUEST['ccustname'])), addslashes_gpc(sanitize_text_field($_REQUEST['cprodtitle'])), addslashes_gpc(sanitize_text_field($_REQUEST['ctransamount'])), addslashes_gpc(sanitize_text_field($_REQUEST['commission_amount'])), addslashes_gpc(sanitize_text_field($_REQUEST['ctranspaymentmethod'])), addslashes_gpc(sanitize_text_field($_REQUEST['ctransreceipt'])), $TodaysDate)); 24 24 $wpdb->query($sql); 25 25 -
apm-child/trunk/functions/core-function.php
r2344825 r2447180 59 59 $share_success_headline = get_option('apm_share_success_headline'); 60 60 61 //--> create category wh neit is not selected at settings page61 //--> create category when it is not selected at settings page 62 62 if($share_success_category == '') 63 63 { 64 64 $parent_term = term_exists( 'social' ); 65 65 66 if(!$parent_term) 66 67 { … … 98 99 $recordCrediantial = $wpdb->get_row($egSqlCrediantial, ARRAY_A); 99 100 100 101 101 //--> Get Information of income. 102 102 if($income_id > 0) … … 108 108 $inc_ctransamount = $egRecord['inc_ctransamount']; 109 109 $inc_commision_amt = $egRecord['inc_commision_amt']; 110 111 $egUpdate = $wpdb->prepare("UPDATE ".$wpdb->prefix."cso_my_income SET `social_post_created` = 'Yes' WHERE ID = %s ", array($income_id)); 112 $wpdb->query($egUpdate); 110 113 } 111 114 else … … 113 116 //--> Daily and Weekly 114 117 115 $egSql = "SELECT * FROM `".$wpdb->prefix."cso_my_income` WHERE social_post_created = 'No'"; 118 $success_story_last_execution_time = get_option('success_story_last_execution_time'); 119 120 $egSql = "SELECT * FROM `".$wpdb->prefix."cso_my_income` WHERE social_post_created = 'No' AND income_date > '".$success_story_last_execution_time."' "; 116 121 $egRecords = $wpdb->get_results($egSql, ARRAY_A); 117 122 … … 132 137 $inc_ctransamount = number_format($inc_ctransamount, 2, '.', ''); 133 138 $inc_commision_amt = number_format($inc_commision_amt, 2, '.', ''); 139 140 141 //--> Replace Title short code 142 143 $post_title = str_replace("[Platform]", $egRecord['inc_income_type'], $post_title); 144 $post_title = str_replace("[Vendor]", $egRecord['inc_ctransvendor'], $post_title); 145 $post_title = str_replace("[CustomerName]", $egRecord['inc_ccustname'], $post_title); 146 $post_title = str_replace("[CustomerEmail]", $egRecord['inc_ccustemail'], $post_title); 147 $post_title = str_replace("[AffiliateName]", $recordCrediantial['first_name'].' '.$recordCrediantial['last_name'], $post_title); 148 $post_title = str_replace("[AffiliateID]", $egRecord['inc_ctransaffiliate'], $post_title); 149 $post_title = str_replace("[Clickid]", $egRecord['inc_caffitid'], $post_title); 150 $post_title = str_replace("[ItemName]", $egRecord['inc_cprodtitle'], $post_title); 151 $post_title = str_replace("[SalesAmount]", $inc_ctransamount, $post_title); 152 $post_title = str_replace("[CommissionAmount]", $inc_commision_amt, $post_title); 153 154 134 155 135 156 //--> Post Body … … 147 168 $social_share_message = str_replace("[CommissionAmount]", $inc_commision_amt, $social_share_message); 148 169 149 $page_data = array( 150 'post_status' => 'publish', 151 'post_type' => 'post', 152 'post_author' => 1, 153 'post_name' => $post_title, 154 'post_title' => $post_title, 155 'post_content' => $social_share_message, 156 'post_parent' => '', 157 'post_category' => array( $share_success_category ), 158 'comment_status' => 'closed', 159 ); 160 161 wp_insert_post( $page_data ); 170 if($inc_ctransamount > 0) 171 { 172 $page_data = array( 173 'post_status' => 'publish', 174 'post_type' => 'post', 175 'post_author' => 1, 176 'post_name' => $post_title, 177 'post_title' => $post_title, 178 'post_content' => $social_share_message, 179 'post_parent' => '', 180 'post_category' => array( $share_success_category ), 181 'comment_status' => 'closed', 182 ); 183 184 wp_insert_post( $page_data ); 185 } 186 187 $TodaysDate = date('Y-m-d H:i:s'); 188 update_option('success_story_last_execution_time', $TodaysDate); 189 162 190 return true; 163 191 } -
apm-child/trunk/mc-main.php
r2389762 r2447180 9 9 Author: Nick James 10 10 E-mail: admin@nickjamesadmin.com 11 Version: 2. 811 Version: 2.9 12 12 Author URI: http://www.pluginpixie.com 13 13 */ 14 14 //ini_set('display_errors',1); 15 15 global $APM_SUBSCRIPTION_VER; 16 $APM_SUBSCRIPTION_VER = "2. 8";16 $APM_SUBSCRIPTION_VER = "2.9"; 17 17 18 18 define('APM_SUBSCRIPTION_PATH', plugins_url().'/'. basename(dirname(__FILE__)).'/'); -
apm-child/trunk/readme.txt
r2389762 r2447180 193 193 *Dispaying Buyers Email at my income page 194 194 *Version update 195 196 2.9 197 *Fix Bugs od success story 198 *Version update
Note: See TracChangeset
for help on using the changeset viewer.