Ejemplo n.º 1
0
<?php

$general_opts = CE_Options::get_instance();
$website_logo = $general_opts->get_website_logo();
?>
<style type="text/css">
	.ui-popup .modal-body{
		padding: 20px;
	}

	.ui-popup #button_paymill {
		color: #FFF;
		width: 100%;
		padding: 10px;
		font-weight: 600;
		font-size: 16px;
		border: none;
		-moz-box-shadow: inset 0 -3px 3px #327dbd;
		-webkit-box-shadow: inset 0 -3px 3px #327DBD;
		box-shadow: inset 0 -3px 3px #327DBD;
		background-color: #3783C5;
		background-image: -moz-linear-gradient(bottom, #3783c5 0%, #3783c5 100%);
		background-image: -o-linear-gradient(bottom, #3783c5 0%, #3783c5 100%);
		background-image: -webkit-linear-gradient(bottom, #3783C5 0%, #3783C5 100%);
		background-image: linear-gradient(bottom, #3783c5 0%, #3783c5 100%);
		border-radius: 3px !important;
		-moz-border-radius: 3px !important;
		-webkit-border-radius: 3px !important;
	}
	.modal-dialog input.error{
		color: #FA5858;
Ejemplo n.º 2
0
function ce_ebay_get_price_format($amount, $style = '', $currency)
{
    $option = new CE_Options();
    $align = $option->get_option('et_currency_align');
    $price_format = $option->get_option('et_currency_format');
    $format = '%1$s';
    switch ($style) {
        case 'sup':
            $format = '<sup>%s</sup>';
            break;
        case 'sub':
            $format = '<sub>%s</sub>';
            break;
        default:
            $format = '%s';
            break;
    }
    $decimal = get_theme_mod('et_decimal', 2);
    $decimal_point = $price_format != 2 ? "." : ",";
    $thousand_sep = $price_format != 2 ? "," : ".";
    if ($align != "right") {
        $format = $format . '%s';
        return sprintf($format, $currency, number_format((double) $amount, $decimal, $decimal_point, $thousand_sep));
    } else {
        $format = '%s' . $format;
        return sprintf($format, number_format((double) $amount, $decimal, $decimal_point, $thousand_sep), $currency);
    }
}
Ejemplo n.º 3
0
<?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;
?>
Ejemplo n.º 4
0
        /**
         * view in backend this plugin.
         */
        function menu_view($args)
        {
            $option = CE_Alert_Option::get_option();
            extract($option);
            $ce_option = new CE_Options();
            $website_logo = $ce_option->get_website_logo();
            ?>
			<div class="et-main-header">

				<div class="title font-quicksand"><?php 
            _e('CE Alert', ET_DOMAIN);
            ?>
</div>
				<div class="desc"><?php 
            _e('Set how frequent your subscribers will receive new ad\'s alert in their inbox.', ET_DOMAIN);
            ?>
</div>
			</div>

			<div class="et-main-content" id="ce_alert">
				<div class="et-main-left">
					<ul class="et-menu-content inner-menu">
						<li>
							<a href="#alert_settings" menu-data="general" class="section-link active">
							<span class="icon" data-icon="y"></span><?php 
            _e('Settings', ET_DOMAIN);
            ?>
</a></li>
						<li>
							<a href="#alert_subscribers" menu-data="update" class="section-link ">
							<span class="icon" data-icon="~"></span> <?php 
            _e('Subscribers', ET_DOMAIN);
            ?>
</a>
						</li>
					</ul>
				</div>
				<div class="alert-content">
					<div class="et-main-main clearfix inner-content" id="setting-general">
						<div class="right-alert">
						<div id="alert_settings_tab" class="tab-alert <?php 
            if (isset($_GET['paged'])) {
                echo 'hide';
            }
            ?>
">
							<div class="title font-quicksand"><?php 
            _e('Mailing settings', ET_DOMAIN);
            ?>
</div>
							<div class="desc">
								<form id="ad_alert" method="post" action="#">
			        				<div class="form-item">
			        					<label><?php 
            _e('Recurrence', ET_DOMAIN);
            ?>
<br><span><?php 
            _e('Choose frequency', ET_DOMAIN);
            ?>
</span></label>
			        					<div class="alignright">
				        					<div class="select-category select-style et-button-select">
				        						<select name="schedule" style="z-index: 10; opacity: 0;">
				        							<option <?php 
            if ($schedule == 'daily') {
                echo 'selected ="selected"';
            }
            ?>
 value="daily"><?php 
            _e('Daily', ET_DOMAIN);
            ?>
</option>
				        							<option <?php 
            if ($schedule == 'weekly') {
                echo 'selected ="selected"';
            }
            ?>
value="weekly"><?php 
            _e('Weekly', ET_DOMAIN);
            ?>
</option>
				        						</select>
				        					</div>
			        					</div>
			        				</div>
			        				<div class="form-item">
			        					<label><?php 
            _e('Ad Limit', ET_DOMAIN);
            ?>
 <br><span><?php 
            _e('Number of ads per email', ET_DOMAIN);
            ?>
</span></label>
			        					<input type="text" class="required number" value="<?php 
            echo $number_ads;
            ?>
" name="number_ads" >
			        					<span class="span-end"><?php 
            _e('Ads', ET_DOMAIN);
            ?>
</span>
			        				</div>
			        				<div class="form-item">
			        					<label><?php 
            _e('Batch Email', ET_DOMAIN);
            ?>
 <br><span><?php 
            _e('Number of emails to send per batch', ET_DOMAIN);
            ?>
</span></label>
			        					<input type="text" class="required number" value="<?php 
            echo $number_emails;
            ?>
" name="number_emails" >
			        					<span class="span-end"><?php 
            _e('Emails', ET_DOMAIN);
            ?>
</span>
			        				</div>
			        				<div class="form-item  form">
							        		<p>Alert emails are sent in batches (Batch Email) per your selected frequency (Recurrence).
							        			For each batch, you can send a maximum of 100 emails. If the number of emails to be sent
							        			at a given time exceeds the batch size you set, the remaining emails will be included in the next batch.
							        			</p>
							        			<p>
							        			Each email contains the number of ad defined in the "Ad Limit" and only "published" ads that match
							        			the subscriber's alert criteria are included.
							        		</p>
							        		<p>
												The "Batch Email" is limited to 100 but some web hosts allow fewer than this value.
												To avoid being blacklisted, you should contact your web host to know the right limit.
							        		</p>

			        				</div>
			        				<input type="hidden" value="save-alert-option" name="action">
			        				<div class="form-item">
			        					<button type="submit" class="et-button btn-button"><?php 
            _e('Save your setting', ET_DOMAIN);
            ?>
</button>
			        				</div>
			        			</form>

							</div>
						</div> <!-- end #alert_settings !-->
						<div id="alert_subscribers_tab" class="tab-alert <?php 
            if (!isset($_GET['paged'])) {
                echo 'hide';
            }
            ?>
">
							<div class="title font-quicksand"><?php 
            _e('Listing Subscribers', ET_DOMAIN);
            ?>
</div>
							<div class="desc">
								<?php 
            global $wp_query;
            $paged = isset($_GET['paged']) ? $_GET['paged'] : 1;
            //$paged = max( 1, get_query_var('paged') );
            $args = array('post_type' => 'subscriber', 'post_status' => 'private', 'paged' => $paged);
            $alerts = new WP_Query($args);
            if ($alerts->have_posts()) {
                echo '<table width="100%"><th align="left" valign="top" width="15%"> Email</th> <th align="left" width="40%" > Categories</th> <th align="center"  width="40%" align="left"> Location </th><th  width="5%">Delete</th>';
                while ($alerts->have_posts()) {
                    $alerts->the_post();
                    echo '<tr><td valign="top" >';
                    $email = get_post_meta(get_the_ID(), 'et_subscriber_email', true);
                    the_title();
                    $status = get_post_meta(get_the_ID(), 'ce_have_new_ad', true);
                    echo '</td><td >';
                    $cats = wp_get_post_terms(get_the_ID(), 'ad_category', array("fields" => "names"));
                    if ($cats) {
                        foreach ($cats as $key => $cat) {
                            echo $cat . ', ';
                        }
                    }
                    echo '</td><td >';
                    $locals = wp_get_post_terms(get_the_ID(), 'ad_location', array("fields" => "names"));
                    if ($locals) {
                        foreach ($locals as $key => $name) {
                            echo $name . ', ';
                        }
                    }
                    echo '</td><td align="center">';
                    echo '<span class="del-subscriber" id="' . get_the_ID() . '" title="Remove ' . get_the_title() . '"> X </span>';
                    echo '</td></tr>';
                }
                echo '</table>';
                echo '<div class="row row-paging">';
                $url = admin_url('admin.php?page=ce-alert');
                ce_alert_pagination($alerts, $paged, $url);
                echo '</div>';
            } else {
                _e(' List subscriber is empty!', ET_DOMAIN);
            }
            ?>

							</div>

						</div><!-- end //#alert_subscribers !-->
						</div> <!--end .right-alert !-->
					</div>
				</div>
			</div>
			<?php 
        }
Ejemplo n.º 5
0
    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 '';
        }
    }
Ejemplo n.º 6
0
 function frontend_js()
 {
     $general_opts = CE_Options::get_instance();
     $website_logo = $general_opts->get_website_logo();
     $paymill = $this->get_api();
     if (is_page_template('page-post-ad.php')) {
         wp_enqueue_script('paymill-root', 'https://bridge.paymill.com/');
         wp_enqueue_script('paymill-modal', plugin_dir_url(__FILE__) . 'paymill.js', array('jquery', 'backbone', 'underscore', 'ce'), false, true);
         wp_localize_script('paymill-modal', 'ce_paymill', array('public_key' => $paymill["public_key"], 'PAYMILL_PUBLIC_KEY' => $paymill["public_key"], 'currency' => ET_Payment::get_currency(), 'card_number_msg' => __('Card number is invalid.', ET_DOMAIN), 'cvc_msg' => __('Card code is invalid.', ET_DOMAIN), 'exp_msg' => __('The credit card expiration date is invalid .', ET_DOMAIN), 'public_key_msg' => __('Invalid public key.', ET_DOMAIN), 'unknow_error' => __('Unknow error', ET_DOMAIN), 'name_card_msg' => __('Name on card is invalid.', ET_DOMAIN)));
     }
 }
Ejemplo n.º 7
0
 function frontend_js()
 {
     $general_opts = CE_Options::get_instance();
     $website_logo = $general_opts->get_website_logo();
     $stripe = $this->get_api();
     if (is_page_template('page-post-ad.php')) {
         wp_enqueue_script('stripe.checkout', 'https://checkout.stripe.com/v2/checkout.js');
         wp_enqueue_script('stripe', 'https://js.stripe.com/v1/');
         wp_enqueue_script('stripe.modal', plugin_dir_url(__FILE__) . '/stripe.js', array('jquery', 'backbone', 'underscore', 'ce'), CE_VERSION, true);
         wp_localize_script('stripe.modal', 'ce_stripe', array('public_key' => $stripe["public_key"], 'currency' => ET_Payment::get_currency(), 'card_number_msg' => __('The Credit card number is invalid.', ET_DOMAIN), 'name_card_msg' => __('The name on card is invalid.', ET_DOMAIN), 'transaction_success' => __('The transaction completed successfull!.', ET_DOMAIN), 'transaction_false' => __('The transaction was not completed successfull!.', ET_DOMAIN)));
     }
 }