get_var("SELECT `id` FROM `".$wpdb->prefix."adrotate` WHERE `type` = 'empty' ORDER BY `id` DESC LIMIT 1;"); if($edit_id == 0) { $wpdb->insert($wpdb->prefix."adrotate", array('title' => '', 'bannercode' => '', 'thetime' => $now, 'updated' => $now, 'author' => $current_user->user_login, 'imagetype' => 'dropdown', 'image' => '', 'link' => '', 'tracker' => 'N', 'responsive' => 'N', 'type' => 'empty', 'weight' => 6, 'sortorder' => 0, 'budget' => 0, 'crate' => 0, 'irate' => 0, 'cities' => serialize(array()), 'countries' => serialize(array()))); $edit_id = $wpdb->insert_id; $wpdb->insert($wpdb->prefix.'adrotate_schedule', array('name' => 'Schedule for ad '.$edit_id, 'starttime' => $now, 'stoptime' => $in84days, 'maxclicks' => 0, 'maximpressions' => 0)); $schedule_id = $wpdb->insert_id; $wpdb->insert($wpdb->prefix.'adrotate_linkmeta', array('ad' => $edit_id, 'group' => 0, 'user' => 0, 'schedule' => $schedule_id)); } $ad_edit_id = $edit_id; } $edit_banner = $wpdb->get_row("SELECT * FROM `".$wpdb->prefix."adrotate` WHERE `id` = '$ad_edit_id';"); $groups = $wpdb->get_results("SELECT * FROM `".$wpdb->prefix."adrotate_groups` WHERE `name` != '' ORDER BY `sortorder` ASC, `id` ASC;"); $schedules = $wpdb->get_row("SELECT `".$wpdb->prefix."adrotate_schedule`.`id`, `starttime`, `stoptime`, `maxclicks`, `maximpressions` FROM `".$wpdb->prefix."adrotate_schedule`, `".$wpdb->prefix."adrotate_linkmeta` WHERE `ad` = $edit_banner->id AND `group` = 0 AND `user` = 0 AND `schedule` = `".$wpdb->prefix."adrotate_schedule`.`id` ORDER BY `".$wpdb->prefix."adrotate_schedule`.`id` ASC LIMIT 1;"); $linkmeta = $wpdb->get_results("SELECT `group` FROM `".$wpdb->prefix."adrotate_linkmeta` WHERE `ad` = '$edit_banner->id' AND `user` = 0 AND `schedule` = 0;"); wp_enqueue_media(); wp_enqueue_script('uploader-hook', plugins_url().'/'.ADROTATE_FOLDER.'/library/uploader-hook.js', array('jquery')); list($sday, $smonth, $syear, $shour, $sminute) = explode(" ", date("d m Y H i", $schedules->starttime)); list($eday, $emonth, $eyear, $ehour, $eminute) = explode(" ", date("d m Y H i", $schedules->stoptime)); $meta_array = ''; foreach($linkmeta as $meta) { $meta_array[] = $meta->group; } if(!is_array($meta_array)) $meta_array = array(); if($ad_edit_id) { if($edit_banner->type != 'empty') { // Errors if(strlen($edit_banner->bannercode) < 1 AND $edit_banner->type != 'empty') echo '

'. __('The AdCode cannot be empty!', 'adrotate').'

'; if(!preg_match("/%image%/i", $edit_banner->bannercode) AND $edit_banner->image != '') echo '

'. __('You did not use %image% in your AdCode but did select an image!', 'adrotate').'

'; if(preg_match("/%image%/i", $edit_banner->bannercode) AND $edit_banner->image == '') echo '

'. __('You did use %image% in your AdCode but did not select an image!', 'adrotate').'

'; if((($edit_banner->imagetype != '' AND $edit_banner->image == '') OR ($edit_banner->imagetype == '' AND $edit_banner->image != ''))) echo '

'. __('There is a problem saving the image. Please reset your image and re-save the ad!', 'adrotate').'

'; if(!preg_match("/%image%/i", $edit_banner->bannercode) AND $edit_banner->responsive == 'Y') echo '

'. __(' You did not use %image% in your AdCode. The responsive checkbox will be ineffective.', 'adrotate').'

'; if(strlen($edit_banner->image) > 0 AND !preg_match("/full/", $edit_banner->image) AND $edit_banner->responsive == 'Y') echo '

'. __('Responsive is enabled but your banner image has the wrong name.', 'adrotate').'

'; if(!preg_match_all('/](.*?)>/i', stripslashes(htmlspecialchars_decode($edit_banner->bannercode, ENT_QUOTES)), $things) AND $edit_banner->tracker == 'Y') echo '

'. __("Clicktracking is enabled but no valid link was found in the adcode!", 'adrotate').'

'; // Ad Notices $adstate = adrotate_evaluate_ad($edit_banner->id); if($edit_banner->type == 'error' AND $adstate == 'active') echo '

'. __('AdRotate cannot find an error but the ad is marked erroneous, try re-saving the ad!', 'adrotate').'

'; if($adstate == 'expired') echo '

'. __('This ad is expired and currently not shown on your website!', 'adrotate').'

'; if($adstate == '2days') echo '

'. __('The ad will expire in less than 2 days!', 'adrotate').'

'; if($adstate == '7days') echo '

'. __('This ad will expire in less than 7 days!', 'adrotate').'

'; if($edit_banner->type == 'disabled') echo '

'. __('This ad has been disabled and does not rotate on your site!', 'adrotate').'

'; } } // Determine image field if($edit_banner->imagetype == "field") { $image_field = $edit_banner->image; $image_dropdown = ''; } else if($edit_banner->imagetype == "dropdown") { $image_field = ''; $image_dropdown = $edit_banner->image; } else { $image_field = ''; $image_dropdown = ''; } ?>
type == 'empty') { ?>

0) { ?>

1. <a href="https://ajdg.solutions/">Buy AdRotate Pro here!</a>

2. <a href="http://www.floatingcoconut.net"><img src="%image%" /></a>

3. <span class="ad-%id%"><a href="http://www.ajdg.net">Text Link Ad!</a></span>

%id%, %image%, %title%, %random%, target="_blank", rel="nofollow"



jpg, jpeg, gif, png, swf flv.
.

type != 'empty') { ?>

id); ?>


"id; ?>".
[adrotate banner="id; ?>"] <?php echo adrotate_ad(id; ?>); ?>

Important:
.





!


(Alkmaar, Philadelphia, Melbourne, ...)

, .

"id; ?>".
[adrotate banner="id; ?>"] <?php echo adrotate_ad(id; ?>); ?>

adspeed > 0) $adspeed = $group->adspeed / 1000; if($group->modus == 0) $modus[] = __('Default', 'adrotate'); if($group->modus == 1) $modus[] = __('Dynamic', 'adrotate').' ('.$adspeed.' '. __('second rotation', 'adrotate').')'; if($group->modus == 2) $modus[] = __('Block', 'adrotate').' ('.$group->gridrows.' x '.$group->gridcolumns.' '. __('grid', 'adrotate').')'; if($group->cat_loc > 0 OR $group->page_loc > 0) $modus[] = __('Post Injection', 'adrotate'); if($group->geo == 1 AND $adrotate_config['enable_geo'] > 0) $modus[] = __('Geolocation', 'adrotate'); $ads_in_group = $wpdb->get_var("SELECT COUNT(*) FROM `".$wpdb->prefix."adrotate_linkmeta` WHERE `group` = ".$group->id." AND `user` = 0 AND `schedule` = 0;"); $class = ('alternate' != $class) ? 'alternate' : ''; ?>
id, $meta_array)) echo "checked"; ?> /> id; ?> - name; ?>'.__('Mode', 'adrotate').': '.implode(', ', $modus); ?>