コード例 #1
0
ファイル: footer.php プロジェクト: ckirk/Beatific
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
				<div class="row">
					<div class="col-md-6">
						<?php 
$logo_url = coupon_get_option('top_bar_logo');
if (!empty($logo_url)) {
    ?>
							<img src="<?php 
    echo esc_url($logo_url);
    ?>
" title="<?php 
    echo esc_attr(coupon_get_option('site-name'));
    ?>
" alt="<?php 
    echo esc_attr(coupon_get_option('site-name'));
    ?>
"/>
						<?php 
}
?>
					</div>
				</div>
			</div>
			<div class="modal-body">

				<div class="row">
					<div class="col-md-4">
						<img src="" class="modal_image" />
					</div>
					<div class="modal-caption col-md-8">
コード例 #2
0
ファイル: main-color.css.php プロジェクト: ckirk/Beatific
}
.form-horizontal .form-group .form-control::-moz-placeholder { /* Mozilla Firefox 19+ */
    color: <?php 
echo $ajax_drop_placeholder_hvr;
?>
;
    opacity: 1;
}
.form-horizontal .form-group .form-control:-ms-input-placeholder { /* Internet Explorer 10+ */
    color: <?php 
echo $ajax_drop_placeholder_hvr;
?>
;
}
<?php 
$navigation_style = coupon_get_option('navigation_style');
if ($navigation_style == 'style_1') {
    ?>
	.navbar-brand{
		width: <?php 
    echo $width;
    ?>
;
	}
	
	@media only screen and (min-width: 780px) {
		.navbar-brand img{
			padding: <?php 
    echo $padding;
    ?>
;
コード例 #3
0
ファイル: page-tpl_ratings.php プロジェクト: ckirk/Beatific
	Template Name: Ratings
*/
get_header();
the_post();
get_template_part('includes/inner_header');
/* grab fetured */
if (get_query_var('paged')) {
    $cur_page = get_query_var('paged');
} else {
    if (get_query_var('page')) {
        $cur_page = get_query_var('page');
    } else {
        $cur_page = 1;
    }
}
$expiring_per_page = coupon_get_option('ratings_per_page');
$main_query = new WP_Query(array('post_type' => 'code', 'meta_key' => 'coupon_average_rate', 'orderby' => 'meta_value_num', 'post_status' => 'publish', 'order' => 'ASC', 'posts_per_page' => $expiring_per_page, 'paged' => $cur_page, 'meta_query' => array('relation' => 'AND', array('key' => 'code_for', 'value' => 'all_users', 'compare' => '='), array('key' => 'code_expire', 'value' => time(), 'compare' => '>'))));
$page_links_total = $main_query->max_num_pages;
$page_links = paginate_links(array('prev_next' => true, 'end_size' => 2, 'mid_size' => 2, 'total' => $page_links_total, 'current' => $cur_page, 'prev_next' => false, 'type' => 'array'));
$pagination = coupon_format_pagination($page_links);
?>
<section class="shop-single">

	<!-- container -->
	<div class="container">
		<div class="row">
			<div class="col-md-12">
				<div class="caption category-caption <?php 
$content = get_the_content();
echo empty($content) ? '' : 'bottom-margin';
?>
コード例 #4
0
ファイル: code_list_complete.php プロジェクト: ckirk/Beatific
    ?>
 btn-default btn-lg <?php 
    echo !empty($code_couponcode) && $coupon_label == 'coupon' ? 'show-code' : '';
    ?>
 btn-padding" data-codeid="<?php 
    echo get_the_ID();
    ?>
">
									<?php 
    if (!empty($code_couponcode) && $coupon_label == 'coupon') {
        echo coupon_get_option('show_code_text');
    } else {
        if (empty($code_couponcode) && $coupon_label == 'coupon') {
            echo coupon_get_option('pack_open_text');
        } else {
            echo coupon_get_option('check_discount_text');
        }
    }
    ?>
								</a>
							</div>
						<?php 
} else {
    ?>
							<div class="col-md-6">
								<p class="dummy-padding"></p>
							</div>
						<?php 
}
?>
						
コード例 #5
0
ファイル: page-tpl_home.php プロジェクト: ckirk/Beatific
				<!-- .row -->
			</div>
			<!-- .container -->
		</section>
	<?php 
    }
}
?>
<!-- .special -->

<!-- =====================================================================================================================================
													B L O G  L A T E S T
====================================================================================================================================== -->
<!-- blog -->
<?php 
$latest_blogs_num = coupon_get_option('home_latest_blogs');
if ($latest_blogs_num > 0) {
    ?>
	<section class="blog">

		<!-- container -->
		<div class="container">
			<!-- row -->
			<div class="row">

				<!-- title -->
				<div class="title blog-title col-md-12">
					<h2><?php 
    _e('Blog Latest', 'coupon');
    ?>
</h2>
コード例 #6
0
	**********************************************************************/
get_header();
get_template_part('includes/inner_header');
if (get_query_var('paged')) {
    $cur_page = get_query_var('paged');
} else {
    if (get_query_var('page')) {
        $cur_page = get_query_var('page');
    } else {
        $cur_page = 1;
    }
}
$taxonomy = get_term_by('slug', get_query_var('term'), 'code_category');
$term_meta = get_option("taxonomy_" . $taxonomy->term_id);
$icon = !empty($term_meta['category_icon']) ? $term_meta['category_icon'] : '';
$main_query = new WP_Query(array('post_type' => 'code', 'post_status' => 'publish', 'posts_per_page' => coupon_get_option('search_per_page'), 'code_category' => get_query_var('term'), 'meta_key' => 'code_type', 'orderby' => 'meta_value_num', 'order' => 'ASC', 'paged' => $cur_page, 'meta_query' => array('relation' => 'AND', array('key' => 'code_for', 'value' => 'all_users', 'compare' => '='), array('key' => 'code_expire', 'value' => time(), 'compare' => '>'))));
$page_links_total = $main_query->max_num_pages;
$page_links = paginate_links(array('format' => '?page=%#%', 'prev_next' => true, 'end_size' => 2, 'mid_size' => 2, 'total' => $page_links_total, 'current' => $cur_page, 'prev_next' => false, 'type' => 'array'));
$pagination = coupon_format_pagination($page_links);
/* get number of items and col_md based on the active status of the right sidebar */
$max_count = is_active_sidebar('sidebar-right') ? 3 : 4;
$col_md = is_active_sidebar('sidebar-right') ? 4 : 3;
?>
<section class="category">

	<!-- container -->
	<div class="container">
		<!-- row -->
		<div class="row">

			<!-- single-shop-container -->
コード例 #7
0
ファイル: single-shop.php プロジェクト: ckirk/Beatific
/**********************************************************************
	***********************************************************************
	COUPON SHOP SINGLE
	**********************************************************************/
get_header();
the_post();
get_template_part('includes/inner_header');
$shop_id = get_the_ID();
$shop_meta = get_post_meta($shop_id);
$shop_link = coupon_get_smeta('shop_link', $shop_meta, '');
?>
	<!-- show show details -->
<?php 
$cur_page = get_query_var('page') ? get_query_var('page') : 1;
//get curent page
$args = array('post_type' => 'code', 'post_status' => 'publish', 'posts_per_page' => coupon_get_option('shop_listing_per_page'), 'code_category' => get_query_var('term'), 'meta_key' => 'code_expire', 'orderby' => 'meta_value_num', 'order' => 'desc', 'paged' => $cur_page, 'meta_query' => array('relation' => "AND", array('key' => 'code_for', 'value' => 'all_users', 'compare' => '='), array('key' => 'code_shop_id', 'value' => $shop_id, 'compare' => '=')));
if (!empty($_GET['label_var'])) {
    $args['meta_query'][] = array('key' => 'coupon_label', 'value' => $_GET['label_var'], 'compare' => '=');
}
$main_query = new WP_Query($args);
$page_links_total = $main_query->max_num_pages;
$page_links = paginate_links(array('base' => add_query_arg('page', '%#%'), 'prev_next' => true, 'end_size' => 2, 'mid_size' => 2, 'total' => $page_links_total, 'current' => $cur_page, 'prev_next' => false, 'type' => 'array'));
$pagination = coupon_format_pagination($page_links);
?>
<section class="shop-single">

        <!-- container -->
        <div class="container">
            <!-- row -->
            <div class="row">
コード例 #8
0
                 $new_user_id = wp_create_user($username, $password, $email);
                 $user_meta = array('city' => $city, 'gender' => $gender, 'age' => $age, 'active_status' => 'inactive', 'subscribe' => 'yes', 'avatar' => '', 'confirmation_hash' => md5(coupon_confirm_hash(100)));
                 coupon_send_subscription($email, false);
                 update_user_meta($new_user_id, 'coupon_user_meta', $user_meta);
                 update_user_meta($new_user_id, 'first_name', $first_name);
                 update_user_meta($new_user_id, 'last_name', $last_name);
                 $subject = coupon_get_option('site_name') . ' | ' . __('Confirm Registration', 'coupon');
                 $sender_name = coupon_get_option('sender_name');
                 $sender_email = coupon_get_option('sender_email');
                 $headers = array();
                 $headers[] = "MIME-Version: 1.0";
                 $headers[] = "Content-Type: text/html; charset=ISO-8859-1";
                 $headers[] = "From: " . $sender_name . " <" . $sender_email . ">";
                 $confirm_link = add_query_arg(array('confirm' => $user_meta["confirmation_hash"], 'user' => $username), coupon_register_login_url());
                 $message = '';
                 $message = str_replace("%LINK%", $confirm_link, coupon_get_option('registration_message'));
                 $message = "<html><body>" . $message . "</body></html>";
                 $message_info = mail($email, $subject, $message, implode("\r\n", $headers));
                 if ($message_info === true) {
                     $confirmation_message = array('icon' => 'envelope', 'title' => __('Confirmation email sent', 'coupon'), 'message' => __('Please <span class="theme-color">check your email and click registration link</span> in order to confirm your membership!', 'coupon'));
                 } else {
                     $confirmation_message = array('icon' => 'circle-o', 'title' => __('Email sending failed', 'coupon'), 'message' => __('Could not send a confirmation email, try again!', 'coupon'));
                 }
             }
         }
     } else {
         echo "Registration is disabled";
     }
 } else {
     if ($_POST['action'] == 'login') {
         if (!wp_verify_nonce($_POST['login_field'], 'login')) {
コード例 #9
0
/*
	Template Name: Daily Offers
*/
get_header();
the_post();
get_template_part('includes/inner_header');
if (get_query_var('paged')) {
    $cur_page = get_query_var('paged');
} else {
    if (get_query_var('page')) {
        $cur_page = get_query_var('page');
    } else {
        $cur_page = 1;
    }
}
$args = array('post_type' => 'daily_offer', 'meta_key' => 'offer_expire', 'orderby' => 'meta_value_num', 'post_status' => 'publish', 'order' => 'DESC', 'posts_per_page' => coupon_get_option('daily_offers_per_page'), 'paged' => $cur_page, 's' => get_query_var('s'), 'meta_query' => array(array('key' => 'offer_expire', 'value' => time(), 'compare' => '>')));
$main_query = new WP_Query($args);
$page_links_total = $main_query->max_num_pages;
$page_links = paginate_links(array('prev_next' => true, 'end_size' => 2, 'mid_size' => 2, 'total' => $page_links_total, 'current' => $cur_page, 'prev_next' => false, 'type' => 'array'));
$pagination = coupon_format_pagination($page_links);
?>
<section class="category">

        <!-- container -->
        <div class="container">
			<div class="row">
				<div class="col-md-12">
					<div class="caption category-caption <?php 
$content = get_the_content();
echo empty($content) ? '' : 'bottom-margin';
?>
コード例 #10
0
<?php

/*
	Template Name: Code Search
*/
get_header();
the_post();
get_template_part('includes/inner_header');
$cur_page = get_query_var('paged') ? get_query_var('paged') : 1;
//get curent page
$search_per_page = coupon_get_option('search_per_page');
if (!isset($_GET['start_range'])) {
    $_GET['start_range'] = 0;
}
if (!isset($_GET['end_range'])) {
    $_GET['end_range'] = 999999999;
}
if (!isset($_GET['code_category'])) {
    $_GET['code_category'] = '';
}
if (!isset($_GET['code_shop_id'])) {
    $_GET['code_shop_id'] = '';
}
if (!isset($_GET['coupon_label'])) {
    $_GET['coupon_label'] = '';
}
$args = array('post_type' => 'code', 'post_status' => 'publish', 'posts_per_page' => $search_per_page, 'meta_key' => 'code_expire', 'orderby' => 'meta_value_num', 'order' => 'DESC', 'paged' => $cur_page, 'meta_query' => array('relation' => "AND", array('key' => 'code_for', 'value' => 'all_users', 'compare' => '='), array('key' => 'code_expire', 'value' => time() + 86400 * $_GET['start_range'], 'compare' => '>='), array('key' => 'code_expire', 'value' => time() + 86400 * $_GET['end_range'], 'compare' => '<=')));
if (!empty($_GET['code_category'])) {
    $args['code_category'] = $_GET['code_category'];
}
if (!empty($_GET['code_shop_id'])) {
コード例 #11
0
ファイル: functions.php プロジェクト: ckirk/Beatific
 function coupon_get_home_subtitle()
 {
     $count_codes = wp_count_posts('code');
     $count_users = count_users();
     $subslogan = coupon_get_option('site_sub_slogan');
     $subslogan = str_replace(array('%USERS%', '%COUPONS%'), array($count_users['total_users'], $count_codes->publish), $subslogan);
     return $subslogan;
 }
コード例 #12
0
*/
get_header();
the_post();
get_template_part('includes/inner_header');
$required_aditional_fields = (array) coupon_get_option('required_aditional_fields');
global $error_labels;
$registered = false;
if (is_user_logged_in()) {
    $registered = true;
}
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    $errors = array();
    if (!wp_verify_nonce($_POST['submit_field'], 'submit')) {
        $errors['nonce'] = $error_labels['nonce'];
    } else {
        $email_info = coupon_get_option('new_code_email');
        $title = esc_sql($_POST['title']);
        $shop_link = esc_sql($_POST['shop_link']);
        $coupon_label = esc_sql($_POST['coupon_label']);
        $coupon_code = esc_sql($_POST['coupon_code']);
        $content = esc_sql($_POST['content']);
        $code_expire = esc_sql($_POST['code_expire']);
        $code_conditions = esc_sql($_POST['code_conditions']);
        $code_discount = esc_sql($_POST['code_discount']);
        $code_text = esc_sql($_POST['code_text']);
        $code_for = esc_sql($_POST['code_for']);
        if (in_array('code_conditions', $required_aditional_fields) && empty($code_conditions)) {
            $errors['code_conditions'] = $error_labels['empty_conditions'];
        }
        if (in_array('code_discount', $required_aditional_fields) && empty($code_discount)) {
            $errors['code_discount'] = $error_labels['empty_discount'];
コード例 #13
0
ファイル: inner_header.php プロジェクト: ckirk/Beatific
					<p class="center-block">
						<?php 
$subtitle = '';
if (is_page()) {
    $subtitle = get_post_meta(get_the_ID(), 'subtitle', true);
}
if (empty($subtitle)) {
    $subtitle = coupon_get_home_subtitle();
}
echo $subtitle;
?>
					</p>
				</div>
				<!-- .slogan -->
				<?php 
$filters = coupon_get_option('ajax_categories');
if ($filters == 'yes') {
    ?>
					<!-- filters -->
					<div class="filters col-md-12">

						<!-- shop-search -->
						<div class="col-md-6">
							<form class="form-horizontal search-coupon" role="search">
								<div class="form-group has-feedback">
									<span class="fa fa-search form-control-feedback icon-left"></span>
									<input type="text" name="search_<?php 
    echo coupon_confirm_hash();
    ?>
" id="search_<?php 
    echo coupon_confirm_hash();
コード例 #14
0
ファイル: page-tpl_expiring.php プロジェクト: ckirk/Beatific
	Template Name: Expiring
*/
get_header();
the_post();
get_template_part('includes/inner_header');
/* grab fetured */
if (get_query_var('paged')) {
    $cur_page = get_query_var('paged');
} else {
    if (get_query_var('page')) {
        $cur_page = get_query_var('page');
    } else {
        $cur_page = 1;
    }
}
$expiring_per_page = coupon_get_option('expiring_per_page');
$main_query = new WP_Query(array('post_type' => 'code', 'meta_key' => 'code_expire', 'orderby' => 'meta_value_num', 'post_status' => 'publish', 'order' => 'ASC', 'posts_per_page' => $expiring_per_page, 'paged' => $cur_page, 'meta_query' => array('relation' => 'AND', array('key' => 'code_for', 'value' => 'all_users', 'compare' => '='), array('key' => 'code_expire', 'value' => time(), 'compare' => '>'))));
$page_links_total = $main_query->max_num_pages;
$page_links = paginate_links(array('prev_next' => true, 'end_size' => 2, 'mid_size' => 2, 'total' => $page_links_total, 'current' => $cur_page, 'prev_next' => false, 'type' => 'array'));
$pagination = coupon_format_pagination($page_links);
?>
<section class="shop-single">

	<!-- container -->
	<div class="container">
		<div class="row">
			<div class="col-md-12">
				<div class="caption category-caption <?php 
$content = get_the_content();
echo empty($content) ? '' : 'bottom-margin';
?>
コード例 #15
0
ファイル: single-daily_offer.php プロジェクト: ckirk/Beatific
</h4>
                            </div>

                            <!-- widget-content -->
                            <div class="widget-content">

                                <!-- coupon-timer -->
                                <div class="time">

                                    <div class="time-caption caption">
										<p><?php 
echo $promo_text;
?>
</p>
										<?php 
$has_ratings = coupon_get_option('code_dailly_ratings');
if (in_array('dailly', $has_ratings)) {
    echo coupon_get_ratings();
}
?>
									</div>

                                    <!-- countdown -->
									<?php 
if (!empty($offer_expire)) {
    ?>
                                    <div class="time-content">

                                        <span class="coupon-meta-caption"><?php 
    _e('Time Left To Buy', 'coupon');
    ?>
コード例 #16
0
<?php

/*
	Template Name: Categories
*/
get_header();
the_post();
get_template_part('includes/inner_header');
?>
<section class="categories">

	<div class="container">
		<div class="row">
			<?php 
$order_by = coupon_get_option('category_order_by');
$order = coupon_get_option('category_order');
$order_by = !empty($order_by) ? $order_by : 'name';
$order = !empty($order) ? $order : 'ASC';
$parents = get_terms('code_category', array('hide_empty' => 0, 'parent' => 0, 'orderby' => $order_by, 'order' => $order));
if (!empty($parents)) {
    foreach ($parents as $parent) {
        ?>
					<div class="col-md-12">
						<div class="caption category-caption">
							<h2><?php 
        echo $parent->name;
        ?>
</h2>
							<div class="line-divider">
								<span class="line-mask green-bg"></span>
							</div>
コード例 #17
0
ファイル: page-tpl_contact.php プロジェクト: ckirk/Beatific
				</div>
			</div>


			<div class="col-md-12">
				<div class="row">

					<div class="col-md-6">
						<div class="register clearfix">

							<!-- title -->
							<div class="caption contact-caption">
								<h2>
									<span class="green"><i class="fa fa-envelope-o"></i>
									</span><?php 
echo coupon_get_option('contact_form_title');
?>
</h2>
							</div>
							<!-- .title -->

							<!-- form -->
							<div class="form register-form">
								<div class="send_result"></div>
								<form action="" method="" class="contact_form">
									<fieldset>
										<div class="form-group">
											<label><?php 
_e('Your name', 'coupon');
?>
</label>
コード例 #18
0
        $email = esc_sql($_POST['email']);
        if (!is_email($email)) {
            $error = __('Email is invalid', 'coupon');
        } elseif (email_exists($email)) {
            $user = get_user_by('email', $email);
            $new_password = coupon_random_string();
            $update_fields = array('ID' => $user->ID, 'user_pass' => $new_password);
            $update_id = wp_update_user($update_fields);
            $subject = coupon_get_option('site_name') . ' | ' . __('Login Credentials', 'coupon');
            $sender_name = coupon_get_option('sender_name');
            $sender_email = coupon_get_option('sender_email');
            $headers = array();
            $headers[] = "MIME-Version: 1.0";
            $headers[] = "Content-Type: text/html; charset=ISO-8859-1";
            $headers[] = "From: " . $sender_name . " <" . $sender_email . ">";
            $lost_pass_message = coupon_get_option('lost_password_message');
            $message = str_replace("%USERNAME%", $user->user_login, $lost_pass_message);
            $message = str_replace("%PASSWORD%", $new_password, $message);
            $message_info = mail($email, $subject, $message, implode("\r\n", $headers));
            if ($message_info === true) {
                $confirmation_message = array('icon' => 'envelope', 'title' => __('Credentials sent', 'coupon'), 'message' => __('Your username and new password have been sent to your email.', 'coupon'));
            } else {
                $confirmation_message = array('icon' => 'times-circle-o', 'title' => __('Email sending failed', 'coupon'), 'message' => __('Could not send credentials to you, try again!', 'coupon'));
            }
        } else {
            $confirmation_message = array('icon' => 'times-circle-o', 'title' => __('Wrong email', 'coupon'), 'message' => __('There is no registered user with that email!', 'coupon'));
        }
    }
}
get_header();
the_post();