base_prefix;
$table_name = $base_prefix . "author_advertising";
$google_values = get_option('kd_author_advertising');
echo "
";
$action = $_POST['action'];
if($action == "delete"){
$user_id = $_POST['user_id'];
$wpdb->query("DELETE FROM $table_name WHERE author_id='$user_id'");
}
if($action == "edit"){
$user_id = $_POST['user_id'];
?>
query("UPDATE $table_name SET author_advertising='$edited_id', his_referral_id=$his_referral_id, author_custom1='$edited_1',author_custom2='$edited_2', author_custom3='$edited_3', author_custom4='$edited_4', author_custom5='$edited_5', author_custom6='$edited_6',author_percentage='$percentage' WHERE author_id='$user_id'");
}
$userresults = $wpdb->get_results("SELECT ID, author_id, author_advertising, his_referral_id, author_custom1, author_custom2, author_custom3, author_custom4, author_custom5, author_custom6, author_percentage FROM $table_name ORDER BY author_id ASC");
?>
|
|
|
|
|
|
|
|
|
|
|
|
| author_id; ?> |
author_id); echo $user_info->user_login; ?> |
his_referral_id <> "") { echo $wpdb->get_var("SELECT user_login FROM $wpdb->users WHERE ID='$userresult->his_referral_id'"); } ?> |
author_advertising; ?> |
author_custom1; ?> |
author_custom2; ?> |
author_custom3; ?> |
author_custom4; ?> |
author_custom5; ?> |
author_custom6; ?> |
author_percentage; ?> |
|