} else { ?> <td><center>--</center></td> <td><center>--</center></td> <?php } ?> <?php } ?> <td><center><?php echo $ad->weight; ?> </center></td> <td><span style="color: <?php echo adrotate_prepare_color($stoptime); ?> ;"><?php echo date_i18n("F d, Y", $stoptime); ?> </span></td> </tr> <?php unset($stats); ?> <?php } ?> <?php } else { ?>
function adrotate_manage_schedules() { global $wpdb; $now = adrotate_now(); $today = adrotate_date_start('day'); $in2days = $now + 172800; $in7days = $now + 604800; $in84days = $now + 7257600; ?> <div class="wrap"> <h1><?php _e('Schedule Management available in AdRotate Pro', 'adrotate'); ?> </h1> <div class="tablenav"> <div class="alignleft actions"> <strong><?php _e('Manage', 'adrotate'); ?> </strong> | <strong><?php _e('Add New', 'adrotate'); ?> </strong> </div> </div> <h3><?php _e('Manage Schedules', 'adrotate'); ?> </h3> <p><?php _e('Schedule management and multiple schedules per advert is available in AdRotate Pro.', 'adrotate'); ?> <a href="admin.php?page=adrotate-pro"><?php _e('More information', 'adrotate'); ?> </a>.</p> <?php wp_nonce_field('adrotate_bulk_schedules', 'adrotate_nonce'); ?> <div class="tablenav top"> <div class="alignleft actions"> <select name="adrotate_action" id="cat" class="postform" disabled> <option value=""><?php _e('Bulk Actions', 'adrotate'); ?> </option> </select> <input type="submit" id="post-action-submit" name="adrotate_action_submit" value="<?php _e('Go', 'adrotate'); ?> " class="button-secondary" disabled /> </div> <br class="clear" /> </div> <table class="widefat" style="margin-top: .5em"> <thead> <tr> <td scope="col" class="manage-column column-cb check-column"><input type="checkbox" disabled/></td> <th width="4%"><center><?php _e('ID', 'adrotate'); ?> </center></th> <th width="20%"><?php _e('Start', 'adrotate'); ?> / <?php _e('End', 'adrotate'); ?> </th> <th width="4%"><center><?php _e('Ads', 'adrotate'); ?> </center></th> <th> </th> <th width="15%"><center><?php _e('Max Impressions', 'adrotate'); ?> </center></th> <th width="10%"><center><?php _e('Max Clicks', 'adrotate'); ?> </center></th> </tr> </thead> <tbody> <?php $schedules = $wpdb->get_results("SELECT * FROM `" . $wpdb->prefix . "adrotate_schedule` WHERE `name` != '' ORDER BY `id` ASC;"); if ($schedules) { $class = ''; foreach ($schedules as $schedule) { $schedulesmeta = $wpdb->get_results("SELECT `ad` FROM `" . $wpdb->prefix . "adrotate_linkmeta` WHERE `group` = 0 AND `user` = 0 AND `schedule` = " . $schedule->id . ";"); if ($schedule->maxclicks == 0) { $schedule->maxclicks = '∞'; } if ($schedule->maximpressions == 0) { $schedule->maximpressions = '∞'; } $class != 'alternate' ? $class = 'alternate' : ($class = ''); if ($schedule->stoptime < $in2days) { $class = 'row_urgent'; } if ($schedule->stoptime < $now) { $class = 'row_inactive'; } ?> <tr id='adrotateindex' class='<?php echo $class; ?> '> <th class="check-column"><input type="checkbox" name="schedulecheck[]" value="" disabled /></th> <td><center><?php echo $schedule->id; ?> </center></td> <td><?php echo date_i18n("F d, Y H:i", $schedule->starttime); ?> <br /><span style="color: <?php echo adrotate_prepare_color($schedule->stoptime); ?> ;"><?php echo date_i18n("F d, Y H:i", $schedule->stoptime); ?> </span></td> <td><center><?php echo count($schedulesmeta); ?> </center></td> <td><?php echo stripslashes(html_entity_decode($schedule->name)); ?> </td> <td><center><?php echo $schedule->maximpressions; ?> </center></td> <td><center><?php echo $schedule->maxclicks; ?> </center></td> </tr> <?php } ?> <?php } else { ?> <tr id='no-schedules'> <th class="check-column"> </th> <td colspan="7"><em><?php _e('No schedules created yet!', 'adrotate'); ?> </em></td> </tr> <?php } ?> </tbody> </table> <center><?php _e('Easily manage your schedules from here with AdRotate Pro.', 'adrotate'); ?> <a href="admin.php?page=adrotate-pro"><?php _e('Upgrade today!', 'adrotate'); ?> </a></center> <p><center> <span style="border: 1px solid #c00; height: 12px; width: 12px; background-color: #ffebe8"> </span> <?php _e("Expires soon.", "adrotate"); ?> <span style="border: 1px solid #466f82; height: 12px; width: 12px; background-color: #8dcede"> </span> <?php _e("Has expired.", "adrotate"); ?> </center></p> <br class="clear" /> <?php adrotate_credits(); ?> <br class="clear" /> </div> <?php }
echo $errorclass; ?> '> <th class="check-column"><input type="checkbox" name="disabledbannercheck[]" value="<?php echo $disbanner['id']; ?> " /></th> <td><center><?php echo $disbanner['id']; ?> </center></td> <td><?php echo date_i18n("F d, Y", $disbanner['firstactive']); ?> <br /><span style="color: <?php echo adrotate_prepare_color($disbanner['lastactive']); ?> ;"><?php echo date_i18n("F d, Y", $disbanner['lastactive']); ?> </span></td> <td><strong><a class="row-title" href="<?php echo admin_url('/admin.php?page=adrotate-ads&view=edit&ad=' . $disbanner['id']); ?> " title="<?php _e('Edit', 'adrotate'); ?> "><?php echo stripslashes(html_entity_decode($disbanner['title'])); ?> </a></strong> - <a href="<?php
echo $class; ?> '> <th class="check-column"><input type="checkbox" name="queuecheck[]" value="<?php echo $queue['id']; ?> " /></th> <td><center><?php echo $queue['id']; ?> </center></td> <td><?php echo date_i18n("F d, Y", $queue['firstactive']); ?> <br /><span style="color: <?php echo adrotate_prepare_color($queue['lastactive']); ?> ;"><?php echo date_i18n("F d, Y", $queue['lastactive']); ?> </span></td> <td><strong><a class="row-title" href="<?php echo admin_url('/admin.php?page=adrotate-ads&view=edit&ad=' . $queue['id']); ?> " title="<?php _e('Edit', 'adrotate-pro'); ?> "><?php echo stripslashes(html_entity_decode($queue['title'])); ?> </a></strong><?php
?> - <strong><?php echo $ad['title']; ?> </strong><?php if (strlen($grouplist) > 0) { echo '<br /><span style="color:#999;"><span style="font-weight:bold;">' . __('Groups', 'adrotate') . ':</span> ' . $grouplist . '</span>'; } ?> </td> <td><?php echo date_i18n("F d, Y", $ad['firstactive']); ?> </td> <td><span style="color: <?php echo adrotate_prepare_color($ad['lastactive']); ?> ;"><?php echo date_i18n("F d, Y", $ad['lastactive']); ?> </span></td> </tr> <tr class='<?php echo $class; ?> '> <td width="20%"><div class="adrotate_stats_large"><?php _e('Impressions', 'adrotate'); ?> <br /><div class="adrotate_large"><?php echo $stats['impressions'];
echo $class; ?> '> <th class="check-column"><input type="checkbox" name="schedulecheck[]" value="<?php echo $schedule->id; ?> " /></th> <td><center><?php echo $schedule->id; ?> </center></td> <td><?php echo date_i18n("F d, Y H:i", $schedule->starttime); ?> <br /><span style="color: <?php echo adrotate_prepare_color($schedule->stoptime); ?> ;"><?php echo date_i18n("F d, Y H:i", $schedule->stoptime); ?> </span></td> <td><a href="<?php echo admin_url('/admin.php?page=adrotate-schedules&view=edit&schedule=' . $schedule->id); ?> "><?php echo stripslashes(html_entity_decode($schedule->name)); ?> </a><span style="color:#999;"><br /><?php _e('Mon:', 'adrotate-pro'); ?> <?php
echo $class . $errorclass; ?> '> <th class="check-column"><input type="checkbox" name="rejectcheck[]" value="<?php echo $reject['id']; ?> " /></th> <td><center><?php echo $reject['id']; ?> </center></td> <td><?php echo date_i18n("F d, Y", $reject['firstactive']); ?> <br /><span style="color: <?php echo adrotate_prepare_color($reject['lastactive']); ?> ;"><?php echo date_i18n("F d, Y", $reject['lastactive']); ?> </span></td> <td><strong><a class="row-title" href="<?php echo admin_url('/admin.php?page=adrotate-ads&view=edit&ad=' . $reject['id']); ?> " title="<?php _e('Edit', 'adrotate-pro'); ?> "><?php echo stripslashes(html_entity_decode($reject['title'])); ?> </a></strong><?php
print_r($stats); echo "</pre></td></tr>"; } $grouplist = adrotate_ad_is_in_groups($disbanner['id']); if($disbanner['type'] == 'disabled') { $errorclass = ' row_inactive'; } else { $errorclass = ''; } ?> <tr id='adrotateindex' class='<?php echo $errorclass; ?>'> <th class="check-column"><input type="checkbox" name="disabledbannercheck[]" value="<?php echo $disbanner['id']; ?>" /></th> <td><center><?php echo $disbanner['id'];?></center></td> <td><?php echo date_i18n("F d, Y", $disbanner['firstactive']);?><br /><span style="color: <?php echo adrotate_prepare_color($disbanner['lastactive']);?>;"><?php echo date_i18n("F d, Y", $disbanner['lastactive']);?></span></td> <td><strong><a class="row-title" href="<?php echo admin_url('/admin.php?page=adrotate-ads&view=edit&ad='.$disbanner['id']);?>" title="<?php _e('Edit', 'adrotate'); ?>"><?php echo stripslashes(html_entity_decode($disbanner['title']));?></a></strong> - <a href="<?php echo admin_url('/admin.php?page=adrotate-ads&view=report&ad='.$disbanner['id']);?>" title="<?php _e('Stats', 'adrotate'); ?>"><?php _e('Stats', 'adrotate'); ?></a><span style="color:#999;"><?php if(strlen($grouplist) > 0) echo '<br /><span style="font-weight:bold;">'.__('Groups:', 'adrotate').'</span> '.$grouplist; ?></td> <td><center><?php echo $stats['impressions']; ?></center></td> <?php if($disbanner['tracker'] == "Y") { ?> <td><center><?php echo $stats['clicks']; ?></center></td> <td><center><?php echo $ctr; ?> %</center></td> <?php } else { ?> <td><center>--</center></td> <td><center>--</center></td> <?php } ?> </tr> <?php } ?> </tbody> </table> </form>