<?php $default = array('number' => 5, 'bgcolor' => 'd9d9d9', 'title' => sprintf(__('Ads from %s', ET_DOMAIN), get_bloginfo("name"))); $arg = wp_parse_args($_REQUEST, $default); extract($arg); $height = $number * 78 + 79; $option = new CE_Options(); $customize = $option->get_customization(); global $et_global; if (!isset($customize['action_2']) || empty($customize['action_2'])) { $customize['action_2'] = '#3783C4'; } ?> <html> <head> <link rel="stylesheet" href="<?php echo CE_ROLL_URL; ?> /css/demo.css" type="text/css" media="screen" /> <link rel="stylesheet" href="<?php echo CE_ROLL_URL; ?> /css/flexslider.css" type="text/css" media="screen" /> <style type="text/css"> body{ background: #<?php echo $bgcolor; ?>
function get_alert_message($cats, $locals, $number_ads) { $option = new CE_Options(); $website_logo = $option->get_website_logo(); $customize = $option->get_customization(); $logo = apply_filters('ce_alert_set_logo_url', $website_logo[0]); $header = '<html class="no-js" lang="en"> <body style="margin: 0px; font-family: ' . $customize['font-text'] . ', sans-serif; font-size: 13px; line-height: 1.3;"> <div style="margin: 0px auto; width:600px; border: 1px solid ' . $customize['background'] . '"> <table width="100%" cellspacing="0" cellpadding="0"> <tr style="background-color: ' . $customize['header'] . '; display:block; padding:10px 0px; vertical-align: middle; box-shadow: 0 2px 0 2px #E3E3E3;"> <td style="padding: 0 10px 0 20px; width: 0px;"> <a href="' . home_url() . '" target="_blank"> <img title="" alt="' . get_option('blogname') . '" src="' . $logo . '" /> </a> </td> <td style="padding-bottom: 3px;"> <span style="text-shadow: 0 0 1px #151515; color: #b0b0b0;">' . get_option('blogdescription') . '</span> </td> <td style="padding-right: 20px; width : 25%"> <!-- see more button --> <a href="' . home_url() . '" target="_blank" style="display: block; position: relative; box-shadow: 0 1px 2px #222; -moz-box-shadow: 0 1px 2px #222; -webkit-box-shadow: 0 1px 2px #222; border-radius: 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px; text-decoration: none; padding: 0 10px; height: 40px; line-height: 40px; background-repeat: repeat-x; background: ' . $customize['action'] . ';"> <span style="color: #fff; font-size: 12px; font-weight: bold; text-shadow: 1px -1px 1px #9e4230;"> ' . __("VIEW MORE ADS", ET_DOMAIN) . ' </span> </a> </td> </tr> <tr style="height: 3px; background-color: ' . $customize['background'] . '"><td colspan="3"></td></tr> <tr> <td colspan="3" style="padding: 10px 20px"> <table> <tr> <td colspan="2" style="line-height : 26px ;font-size : 18px; color: #5c5c5c; padding-bottom: 10px; font-weight: normal; font-family :' . $customize['font-heading'] . ';"> ' . sprintf(__('Re-discover your potentials. Re-vision your future. Meet Success. Let %s take you there!', ET_DOMAIN), get_option('blogname')) . ' </td> </tr>'; $ad_content = ''; $ad_arg = array('post_type' => 'ad', 'post_status' => 'publish', 'posts_per_page' => $number_ads); if ($cats) { $ad_arg['tax_query'][] = array('taxonomy' => 'ad_category', 'field' => 'id', 'terms' => $cats, 'operator' => 'IN'); } if ($locals) { $ad_arg['tax_query'][] = array('taxonomy' => 'ad_location', 'field' => 'id', 'terms' => $locals, 'operator' => 'IN'); } if ($cats && $locals) { $ad_arg['tax_query']['relation'] = 'AND'; } $ads = new WP_Query($ad_arg); while ($ads->have_posts()) { $ads->the_post(); global $post; $url = TEMPLATEURL . '/img/no_image.gif'; if ($website_logo) { $url = $website_logo[0]; } $url = apply_filters('ce_alert_no_thumbnail_url', $url); if (has_post_thumbnail()) { $thumb = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'ad-thumbnail-grid'); $url = $thumb['0']; } $ad = CE_Ads::convert($post); $ad_content .= '<tr> <td style="padding: 8px 10px 15px 0;"> <a style="display: block; padding: 5px; text-decoration:none; height: 70px; border-radius: 3px; text-decoration: none; -moz-border-radius: 3px; -webkit-border-radius: 3px; -moz-box-shadow: 0 3px 3px #E9E9E9; -webkit-box-shadow: 0 3px 3px #E9E9E9; box-shadow: 0 3px 3px #E9E9E9; border-bottom:2px solid #E9E9E9;"> <img width="auto" style= "max-width:153px; max-height:111px" height="auto" title="" alt="" src="' . $url . '" /></a> </td> <td valign="top" style="padding: 10px 0;"> <a href="' . get_permalink() . '" style="font-size :13px; color: #3399CC; font-family :' . $customize['font-heading'] . '; text-decoration: none; display: block; font-weight: 700; margin-bottom: 10px; text-transform: uppercase;">' . get_the_title() . '</a> <div style="color: #909090;font-family :' . $customize['font-text'] . '; font-size :12px;"> <span style="color=' . $customize['action_2'] . '" >' . $ad->price . '</span> <br /> ' . get_the_excerpt() . ' </div> </td> </tr>'; } // end while wp_reset_query(); $info = apply_filters('ce_mail_footer_contact_info', get_option('blogname') . ' <br>' . get_option('admin_email') . ' <br>'); $footer = '</table> </td> </tr> <tr style="padding: 10px 20px; color: #909090; height: 89px; background-repeat: repeat-x; background-color:#f7f7f7; border-top:1px solid #eaeaea"> <td colspan="3"> <table width="100%" cellspacing="0" cellpadding="0" bo> <tr> <td style="text-align: left; padding: 10px 20px; width:123px;"> <a href="' . home_url() . '" target="_blank" style="display: block; position: relative; box-shadow: 0 1px 2px #999; -moz-box-shadow: 0 1px 2px #999; -webkit-box-shadow: 0 1px 2px #999; border-radius: 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px; text-decoration: none; padding: 0 10px; height: 40px; line-height: 40px; background-repeat: repeat-x; background: ' . $customize['action'] . ';"> <span style="color: #fff; font-size: 12px; font-weight: bold; text-shadow: 1px -1px 1px #9e4230;"> ' . __("VIEW MORE ADS", ET_DOMAIN) . ' </span> </a> </td> <td style="text-align: left; padding: 10px 20px;"> <table> <tr> <td>' . $option->get_copyright() . '</td> </tr> <tr> <td style="text-align:center;"><a class="link-unsubscriber" style="text-decoration:none" href="[unsubscribe_link]">' . __('Unsubscribe from this newsletter.', ET_DOMAIN) . '</a> </td> </tr> </table> </td> <td style="text-align: right; padding: 10px 20px;"> ' . $info . ' </td> </tr> </table> </td> </tr> </table> </div> </body> </html>'; if ($ad_content != '') { $header_email = apply_filters("ce_alert_header_email", $header); $footer_email = apply_filters("ce_alert_footer_email", $footer); return $header_email . $ad_content . $footer_email; } else { return ''; } }