"; } ?> '; //Form data updated here if($_POST['paypal'] != ""){ $paypal = strip_tags($_POST['paypal']); if (isValidemail($paypal)) { update_usermeta($current_user->ID, 'paypal', $paypal); echo "Paypal Email Address has been entered into the system.
"; } else { echo "Paypal Email Address is not correct. Please enter a valid email
"; } } if (validate_custom($_POST['custom'],$maximagewidth,$maximageheight) == 1 ) { echo "The URL pointing to your custom image is valid and updated
"; $custom = strip_tags($_POST['custom']); update_usermeta($current_user->ID, 'custom', $custom); } elseif (validate_custom($_POST['custom'],$maximagewidth,$maximageheight) != 1 && $_POST['custom'] != "") { echo "There is a problem with the URL pointing to your custom image.
"; } if (isValidURL($_POST['customlink']) == 1) { echo 'The target URL that your custom image points to has been updated.
'; $customlink = strip_tags($_POST['customlink']); update_usermeta($current_user->ID, 'customlink', $customlink); } elseif (isValidURL($_POST['customlink']) != 1 && $_POST['customlink'] != "") { echo "There is a problem with your custom advertisement link.
"; } if(is_numeric($_POST['customexpire']) && $_POST['customexpire'] != "") { if ( $_POST['customexpire'] <= 365 ) { $customexpire = strip_tags($_POST['customexpire']); update_usermeta($current_user->ID, 'customexpire', $customexpire); echo "The expiry time of custom advertising campaign has been updated.
"; if ( $_POST['customexpired'] != "") { echo ' ~~~>The custom Campaign has been set to: '.$_POST['customexpired'].''; $customexpired = strip_tags($_POST['customexpired']); update_usermeta($current_user->ID, 'customexpired', $customexpired); } else { echo ' Custom campaign will be set to months by default since no choice has been made.'; $customexpired = "Months"; update_usermeta($current_user->ID, 'customexpired', $customexpired); } $exp_time = expiry_time($customexpire,$customexpired); update_usermeta($current_user->ID, 'expiry_time', $exp_time); } else { echo "The value entered for the length of advertising campaign should be less than 365
"; } } elseif($_POST['customexpire'] != "") { echo "The value entered for the length of advertising campaign should be numeric!
"; } if ($_POST['preference'] != "") { $preferences = $_POST['preference']; update_usermeta($current_user->ID, 'preference', $preferences); echo "Your ad preferences have been updated."; } if ($_POST['submit'] == "Request approval") { $path = WP_PLUGIN_URL; $admin_email = get_settings('admin_email'); $mail = "

User ".$current_user->user_nicename." (".$current_user->user_email.") is requesting activation of the code feature in the MultiUser Ad system Script.

"; $mail .= "
If you are confident that this user is trustable, please click on the link below to enable access to the code feature. The user will be able to input his own PHP and HTML code into the website. This feature can be misused to direct SQL injection or deface the site. To revoke access in the future, go to your wordpress database -> user_meta and remove the key 'approval'."; $mail .= "

Click on the following link to activate access: ".$path."/wordpress-multiple-user-ad-management/verify.php?pkey=".$current_user->user_pass."&id=".$current_user->ID.""; $headers = "From: $admin_email\r\n"; $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; $mail_sent = @mail( $admin_email,"User Requesting Code field Approval", $mail, $headers ); echo $mail_sent ? "Mail has been sent to the administrator." : "Mail failed to the administrator. This is probably due to incorrect SMTP settings."; if ($mail_sent) { update_usermeta($current_user->ID, 'approval', 2); }; } elseif ($_POST['submit'] == "Update code settings") { $code = $_POST['code']; update_usermeta($current_user->ID, 'code', $code); echo "Code settings have been updated for this account."; } if($_POST['submit'] == "Clear Statistics") { update_usermeta($current_user->ID, 'adclicks',0); update_usermeta($current_user->ID, 'adimpressions',0); echo "Statistics have been cleared."; } if($_POST['submit'] == "Update text link settings") { $texttitle = strip_tags($_POST['texttitle']); update_usermeta($current_user->ID, 'texttitle', $texttitle); echo 'The text link title has been updated.
'; if (isValidURL($_POST['textlink']) == 1) { echo 'The target URL that your text link points to has been updated.
'; $textlink = strip_tags($_POST['textlink']); update_usermeta($current_user->ID, 'textlink', $textlink); } else { echo "There is a problem with the url of your text link.
"; } } echo ''; } ?> ID ,'paypal'); $preference = get_usermeta($current_user->ID ,'preference'); $custom = get_usermeta($current_user->ID ,'custom'); $customlink = get_usermeta($current_user->ID ,'customlink'); $customexpire = get_usermeta($current_user->ID ,'customexpire'); $customexpired = get_usermeta($current_user->ID ,'customexpired'); $approval = get_usermeta($current_user->ID ,'approval'); $code = get_usermeta($current_user->ID ,'code'); $textlink = get_usermeta($current_user->ID ,'textlink'); $texttitle = get_usermeta($current_user->ID ,'texttitle'); $default = get_usermeta(1,'default'); ?> Wordpress Multi-User ad management Plugin"; ?>

Are you currently an author on this blog? If so, every post you have submitted has the potential to earn revenue. Simply fill in the fields below to activate your ads on your posts!

ID == $default) { echo "You are the default user and thus, your ads will be displayed 100% of the time on your posts"; } else{ $probability = 100-get_usermeta(1 ,'ratio'); echo "The probability of your ads getting displayed on your posts is ".$probability."% "; } ?>

Clicks Vs. Impressions Graph

The graph below depicts the number of clicks and impressions your advertisements have received. Click count is only enabled for custom image and text link type advertisements. The number of impressions your advertisements receive will still be tracked regardless of the advertisement type. The statistics will clear when you press the clear now button
ID); ?>

Current Advertisement Settings for your account

Advertisement Type 1: Custom Image Advertisement (Click Tracking Enabled)

/> Hours /> Days /> Months

If you do not wish to set an expiration date, leave the fields below blank or enter a value of zero. Otherwise, ensure the value input into the field above is less than or equal to 365

'; } ?>
Advertisement Type 2: Simple text link (Click Tracking Enabled)



Advertisement Type 3: Paypal Donations Button (Click Tracking Disabled)

Advertisement Type 4: Adsense Code (Click Tracking Disabled)

In order to activate this feature, you must be approved by the administrator. Approval is needed as, this feature passes unsanitized code to the MySql database.

';} elseif($approval == 1) {echo '';} else { echo '';} ?>

/> Paypal /> Custom Image Ads /> Code /> Textlink /> Disable