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' => $userdata->user_login, 'imagetype' => 'dropdown', 'image' => '', 'tracker' => 'N', 'show_everyone' => 'Y', 'desktop' => 'Y', 'mobile' => 'Y', 'tablet' => 'Y', 'os_ios' => 'Y', 'os_android' => 'Y', 'os_other' => 'Y', 'type' => 'empty', 'weight' => 6, 'autodelete' => 'N', 'budget' => 0, 'crate' => 0, 'irate' => 0, 'state_req' => 'N', 'cities' => serialize(array()), 'states' => serialize(array()), '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, 'spread' => 'N', 'daystarttime' => '0000', 'daystoptime' => '0000', 'day_mon' => 'Y', 'day_tue' => 'Y', 'day_wed' => 'Y', 'day_thu' => 'Y', 'day_fri' => 'Y', 'day_sat' => 'Y', 'day_sun' => 'Y', 'autodelete' => 'N')); $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}';"); if($edit_banner) { $groups = $wpdb->get_results("SELECT * FROM `{$wpdb->prefix}adrotate_groups` WHERE `name` != '' ORDER BY `id` ASC;"); $schedule = $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/library/uploader-hook.js', array('jquery')); // Set up start and end date list($start_day, $start_month, $start_year, $start_hour, $start_minute) = explode(" ", date("d m Y H i", $schedule->starttime)); list($end_day, $end_month, $end_year, $end_hour, $end_minute) = explode(" ", date("d m Y H i", $schedule->stoptime)); $start_date = $start_day.'-'.$start_month.'-'.$start_year; $end_date = $end_day.'-'.$end_month.'-'.$end_year; $meta_array = array(); foreach($linkmeta as $meta) { $meta_array[] = $meta->group; } 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%|%asset%)/i", $edit_banner->bannercode, $things) AND $edit_banner->image != '') echo '

'. __('You did not use %asset% (or %image%) in your AdCode but did select a file to use!', 'adrotate').'

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

'. __('You did use %asset% (or %image%) in your AdCode but did not select a file to use!', '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_all('/<(a|script|embed|iframe)[^>](.*?)>/i', stripslashes(htmlspecialchars_decode($edit_banner->bannercode, ENT_QUOTES)), $things) AND $edit_banner->tracker == 'Y') echo '

'. __("Tracking is enabled but no valid link/tag 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') { ?>

type != 'empty') { ?> 0) { ?>
 

<a href="https://ajdg.solutions/"><img src="%asset%" /></a>

<iframe src="%asset%" height="250" frameborder="0" style="border:none;"></iframe>

<a href="http://www.arnan.me/">Visit arnan.me</a>

<a href="https://ajdg.solutions/" target="_blank"><img src="%asset%" /></a>

<a href="https://ajdg.solutions/?timestamp=%random%"><img src="%asset%" /></a>

%id% %asset% %title% %random% target="_blank" rel="nofollow"

id); ?>




!

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

(dd-mm-yyyy) (dd-mm-yyyy)
(hh:mm) (hh:mm)
!



!


Amsterdam, New York, Manila, Mexico City, Tokyo.


Ohio, California, Noord Holland, Normandy.

United States
Australia
Germany
Brazil
Japan
Netherlands
Mexico
Canada
South Africa
Belize
France
Belgium
Spain
India
Egypt
Greece
Italy
Russia
, !

[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); ?>

type != 'empty') { ?>