Пример #1
0
 /**
  *
  * Shortcode parsing method for Membership page listings
  * @param array $atts
  * @return string|void
  */
 function membership_page_listings($atts)
 {
     extract(shortcode_atts(array('style' => '', 'columns' => 1, 'product' => 0, 'category' => 0, 'subcategory' => 0, 'comments' => 0, 'drip_content' => 0, 'resize_thumb_height' => 0, 'show_children' => '', 'order' => '', 'hide_description' => 'N'), $atts));
     $product = intval($product);
     $category = intval($category);
     $subcategory = intval($subcategory);
     $parentId = 0;
     $page_id = defined('OP_PAGEBUILDER_ID') ? OP_PAGEBUILDER_ID : $post->ID;
     $title_font = op_asset_font_style($atts);
     if (!empty($title_font)) {
         $title_style = "style='" . $title_font . "'";
     } else {
         $title_style = '';
     }
     $content_font = op_asset_font_style($atts, 'content_font_');
     if (!empty($content_font)) {
         $content_style = "style='" . $content_font . "'";
     } else {
         $content_style = '';
     }
     // which children should we take?
     if (!empty($show_children)) {
         $parentId = $page_id;
     } else {
         if (!empty($product) && empty($category) && empty($subcategory)) {
             $parentId = $product;
         } else {
             if (!empty($product) && !empty($category) && empty($subcategory)) {
                 $parentId = $category;
             } else {
                 if (!empty($product) && !empty($category) && !empty($subcategory)) {
                     $parentId = $subcategory;
                 }
             }
         }
     }
     if (!empty($order)) {
         $temp = explode('|', $order);
         $order_column = $temp[0];
         $order_direction = $temp[1];
     } else {
         $order_column = 'post_title';
         $order_direction = 'asc';
     }
     $args = array('posts_per_page' => -1, 'sort_column' => $order_column, 'sort_order' => $order_direction, 'parent' => $parentId, 'hierarchical' => 0, 'post_status' => 'publish');
     $pages = get_pages($args);
     if ($order_column == 'post_title') {
         if ($order_direction == 'asc') {
             usort($pages, array("OptimizePress_LiveEditor_Assets", "sortNaturalAsc"));
         } else {
             usort($pages, array("OptimizePress_LiveEditor_Assets", "sortNaturalDesc"));
         }
     }
     if (!empty($resize_thumb_height)) {
         $img_class = ' thumb_resize ';
     } else {
         $img_class = '';
     }
     if (empty($pages) || $parentId == 0) {
         if (is_admin()) {
             return __('No child membership pages found! Note: Pages will only show in this once they are Published in Wordpress. Draft pages will not show', OP_SN);
         }
     }
     $html = '';
     switch ($columns) {
         case 1:
             $class = 'page-listing one-col';
             break;
         case 2:
             $class = 'page-listing two-col';
             break;
         case 3:
             $class = 'page-listing three-col';
             break;
         case 4:
             $class = 'page-listing four-col';
             break;
     }
     foreach ($pages as $page) {
         /*if (defined("WS_PLUGIN__OPTIMIZEMEMBER_VERSION")) {
               if (!is_permitted_by_optimizemember($page->ID, "page")) {
                   continue;
               }
           }*/
         // drip content
         $dripContentHtml = '';
         if (defined("WS_PLUGIN__OPTIMIZEMEMBER_VERSION")) {
             global $current_user;
             $hideContent = false;
             if (isset($GLOBALS['WS_PLUGIN__']['optimizemember']['o']['filter_wp_query']) && 'all' === $GLOBALS['WS_PLUGIN__']['optimizemember']['o']['filter_wp_query'][0]) {
                 $hideContent = true;
             }
             if (!is_permitted_by_optimizemember($page->ID, "page") && true === $hideContent) {
                 continue;
             }
             $unavailableContent = c_ws_plugin__optimizemember_utils_gets::get_unavailable_singular_ids_with_dripped_content($current_user);
             // getting content drip days setting
             $drip_days = get_post_meta($page->ID, "optimizemember_drip_days", true);
             if ($drip_days) {
                 // if hide links is disabled in OPM general settings, content by this ID is not available to current user and show drip content timer is checked on
                 // membership page listings element
                 if (false === $hideContent && in_array($page->ID, $unavailableContent) && !empty($drip_content) && !current_user_can('level_10')) {
                     //if ($array = is_page_protected_by_optimizemember($page->ID)) { // is it protected?
                     $time = optimizemember_paid_registration_time();
                     if (!empty($time) && $time > strtotime("-" . $drip_days . " days")) {
                         $daysTo = intval(($time + $drip_days * 86400 - time()) / 86400);
                         if (0 === $daysTo) {
                             $dripContentHtml = '<p class="pagelisting-drip-content">' . __('Less than a day left to be able to access this content', OP_SN) . '</p>';
                         } else {
                             $dripContentHtml = '<p class="pagelisting-drip-content">' . sprintf(_n('%d day left to be able to access this content', '%d days left to be able to access this content', $daysTo, OP_SN), $daysTo) . '</p>';
                         }
                     }
                     //}
                 }
                 // if hide links is enabled in OPM general settings, content by this ID is not available to current user and show drip content timer is disabled on
                 // membership page listings element - hide content completely
                 if (true === $hideContent && in_array($page->ID, $unavailableContent) && !current_user_can('level_10')) {
                     continue;
                 }
                 // if user is not logged in
                 if (true === $hideContent && !is_user_logged_in()) {
                     continue;
                 }
             }
         }
         $meta = get_post_meta($page->ID);
         if (!empty($meta['_' . OP_SN . '_page_thumbnail'])) {
             $image = $meta['_' . OP_SN . '_page_thumbnail'][0];
             $alt = $page->post_title;
         }
         if (!empty($comments)) {
             $comments = wp_count_comments($page->ID);
             $commentCount = $comments->approved;
             $commentHtml = '<p class="pagelisting-comment">' . sprintf(__('%d comments', OP_SN), $commentCount) . '</p>';
         } else {
             $commentHtml = '';
         }
         $meta = $meta['_' . OP_SN . '_membership'][0];
         $meta = unserialize(unserialize($meta));
         $html .= '<div class="' . $class . '">';
         $html .= '
             <a href="' . get_permalink($page->ID) . '" class="pagelisting-style-' . $style . ' border">
                 <div class="thumb">';
         if ($image != '') {
             $html .= '<img src="' . $image . '" alt="' . $alt . '" class="scale-with-grid ' . $img_class . '" />';
         } else {
             $html .= '<img src="' . OP_IMG . 'default-page-listings.png" alt="' . $alt . '" class="scale-with-grid ' . $img_class . '" />';
         }
         $html .= '</div>
                 <div class="content">
                     <h3 ' . $title_style . '>' . $page->post_title . '</h3>' . $commentHtml . $dripContentHtml;
         if ($hide_description !== 'Y') {
             $description = stripslashes(base64_decode($meta['description']));
             if (strlen($description) > 140) {
                 $html .= '<p ' . $content_style . '>' . substr($description, 0, 140) . '...</p>';
             } else {
                 $html .= '<p ' . $content_style . '>' . $description . '</p>';
             }
         }
         $html .= '</div>
             </a>
         ';
         $html .= '</div>';
     }
     $html .= '<script type="text/javascript">(function($){function resizeWindow(){if($(window).width()>=767)$(".container").each(function(){var e=0;var t=$(this).find("[class*=\'pagelisting-style-\']");t.css({height:"auto"});t.each(function(){var t=$(this).height();if(t>e)e=t});t.height(e)})}$(document).ready(function(){$(window).bind("resize",resizeWindow);$(window).bind("load",resizeWindow)})})(opjq);</script>' . "\n";
     return $html;
 }
Пример #2
0
 /**
  * Handles Post Level Access permissions *( for current Post )*.
  *
  * @package optimizeMember\Posts
  * @since 3.5
  *
  * @return null Or exits script execution after redirection.
  */
 public static function check_post_level_access()
 {
     global $post;
     /* ``get_the_ID()`` unavailable outside The Loop. */
     /**/
     do_action("ws_plugin__optimizemember_before_check_post_level_access", get_defined_vars());
     /**/
     $excluded = apply_filters("ws_plugin__optimizemember_check_post_level_access_excluded", false, get_defined_vars());
     /**/
     if (!$excluded && is_single() && is_object($post) && !empty($post->ID) && ($post_id = (int) $post->ID) && $GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["membership_options_page"]) {
         if (!c_ws_plugin__optimizemember_systematics::is_wp_systematic_use_page()) {
             $user = is_user_logged_in() && is_object($user = wp_get_current_user()) && !empty($user->ID) ? $user : false;
             /* Current User's object. */
             /**/
             if ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["login_redirection_override"] && ($login_redirection_uri = c_ws_plugin__optimizemember_login_redirects::login_redirection_uri($user, "root-returns-false")) && preg_match("/^" . preg_quote($login_redirection_uri, "/") . "\$/", $_SERVER["REQUEST_URI"]) && c_ws_plugin__optimizemember_no_cache::no_cache_constants(true) && (!$user || !$user->has_cap("access_optimizemember_level0"))) {
                 c_ws_plugin__optimizemember_mo_page::wp_redirect_w_mop_vars("post", $post_id, "level", 0, $_SERVER["REQUEST_URI"], "sys") . exit;
             } else {
                 if (!c_ws_plugin__optimizemember_systematics::is_systematic_use_page()) {
                     for ($n = $GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["levels"]; $n >= 0; $n--) {
                         if ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["level" . $n . "_posts"] === "all" && c_ws_plugin__optimizemember_no_cache::no_cache_constants(true) && (!$user || !$user->has_cap("access_optimizemember_level" . $n))) {
                             c_ws_plugin__optimizemember_mo_page::wp_redirect_w_mop_vars("post", $post_id, "level", $n, $_SERVER["REQUEST_URI"]) . exit;
                         } else {
                             if (strpos($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["level" . $n . "_posts"], "all-") !== false && in_array("all-" . $post->post_type . "s", preg_split("/[\r\n\t\\s;,]+/", $GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["level" . $n . "_posts"])) && c_ws_plugin__optimizemember_no_cache::no_cache_constants(true) && (!$user || !$user->has_cap("access_optimizemember_level" . $n))) {
                                 c_ws_plugin__optimizemember_mo_page::wp_redirect_w_mop_vars("post", $post_id, "level", $n, $_SERVER["REQUEST_URI"]) . exit;
                             } else {
                                 if ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["level" . $n . "_posts"] && in_array($post_id, preg_split("/[\r\n\t\\s;,]+/", $GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["level" . $n . "_posts"])) && c_ws_plugin__optimizemember_no_cache::no_cache_constants(true) && (!$user || !$user->has_cap("access_optimizemember_level" . $n))) {
                                     c_ws_plugin__optimizemember_mo_page::wp_redirect_w_mop_vars("post", $post_id, "level", $n, $_SERVER["REQUEST_URI"]) . exit;
                                 }
                             }
                         }
                     }
                     /**/
                     for ($n = $GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["levels"]; $n >= 0; $n--) {
                         if ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["level" . $n . "_catgs"] === "all" && c_ws_plugin__optimizemember_no_cache::no_cache_constants(true) && (!$user || !$user->has_cap("access_optimizemember_level" . $n))) {
                             c_ws_plugin__optimizemember_mo_page::wp_redirect_w_mop_vars("post", $post_id, "level", $n, $_SERVER["REQUEST_URI"], "catg") . exit;
                         } else {
                             if ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["level" . $n . "_catgs"] && (in_category($catgs = preg_split("/[\r\n\t\\s;,]+/", $GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["level" . $n . "_catgs"]), $post_id) || c_ws_plugin__optimizemember_utils_conds::in_descendant_category($catgs, $post_id)) && c_ws_plugin__optimizemember_no_cache::no_cache_constants(true) && (!$user || !$user->has_cap("access_optimizemember_level" . $n))) {
                                 c_ws_plugin__optimizemember_mo_page::wp_redirect_w_mop_vars("post", $post_id, "level", $n, $_SERVER["REQUEST_URI"], "catg") . exit;
                             }
                         }
                     }
                     /**/
                     if (has_tag()) {
                         for ($n = $GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["levels"]; $n >= 0; $n--) {
                             if ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["level" . $n . "_ptags"] === "all" && c_ws_plugin__optimizemember_no_cache::no_cache_constants(true) && (!$user || !$user->has_cap("access_optimizemember_level" . $n))) {
                                 c_ws_plugin__optimizemember_mo_page::wp_redirect_w_mop_vars("post", $post_id, "level", $n, $_SERVER["REQUEST_URI"], "ptag") . exit;
                             } else {
                                 if ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["level" . $n . "_ptags"] && has_tag(preg_split("/[\r\n\t;,]+/", $GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["level" . $n . "_ptags"])) && c_ws_plugin__optimizemember_no_cache::no_cache_constants(true) && (!$user || !$user->has_cap("access_optimizemember_level" . $n))) {
                                     c_ws_plugin__optimizemember_mo_page::wp_redirect_w_mop_vars("post", $post_id, "level", $n, $_SERVER["REQUEST_URI"], "ptag") . exit;
                                 }
                             }
                         }
                     }
                     /**/
                     for ($n = $GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["levels"]; $n >= 0; $n--) {
                         if ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["level" . $n . "_ruris"]) {
                             /* URIs configured at this Level? */
                             /**/
                             foreach (preg_split("/[\r\n\t]+/", c_ws_plugin__optimizemember_ruris::fill_ruri_level_access_rc_vars($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["level" . $n . "_ruris"], $user)) as $str) {
                                 if ($str && preg_match("/" . preg_quote($str, "/") . "/", $_SERVER["REQUEST_URI"]) && c_ws_plugin__optimizemember_no_cache::no_cache_constants(true) && (!$user || !$user->has_cap("access_optimizemember_level" . $n))) {
                                     c_ws_plugin__optimizemember_mo_page::wp_redirect_w_mop_vars("post", $post_id, "level", $n, $_SERVER["REQUEST_URI"], "ruri") . exit;
                                 }
                             }
                         }
                     }
                     /**/
                     if (is_array($ccaps_req = get_post_meta($post_id, "optimizemember_ccaps_req", true)) && !empty($ccaps_req) && c_ws_plugin__optimizemember_no_cache::no_cache_constants(true)) {
                         foreach ($ccaps_req as $ccap) {
                             /* The ``$user`` MUST satisfy ALL Custom Capability requirements. Stored as an array of Custom Capabilities. */
                             if (strlen($ccap) && (!$user || !$user->has_cap("access_optimizemember_ccap_" . $ccap))) {
                                 c_ws_plugin__optimizemember_mo_page::wp_redirect_w_mop_vars("post", $post_id, "ccap", $ccap, $_SERVER["REQUEST_URI"], "ccap") . exit;
                             }
                         }
                     }
                     /**/
                     /**/
                     $dripDays = get_post_meta($page_id, "optimizemember_drip_days", true);
                     if (!empty($dripDays) && c_ws_plugin__optimizemember_no_cache::no_cache_constants(true)) {
                         $dripUrl = get_post_meta($page_id, "optimizemember_drip_redirect_url", true);
                         $time = optimizemember_paid_registration_time('level' . OPTIMIZEMEMBER_CURRENT_USER_ACCESS_LEVEL);
                         if ($time && $time >= ($_days_ago = strtotime("-{$dripDays} days")) && !current_user_can('manage_options')) {
                             if (!empty($dripUrl)) {
                                 wp_redirect($dripUrl);
                                 exit;
                             } else {
                                 c_ws_plugin__optimizemember_mo_page::wp_redirect_w_mop_vars("page", $page_id, "drip_days", $dripDays, $_SERVER["REQUEST_URI"], "drip_days") . exit;
                             }
                         }
                     }
                     /**/
                     if ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["specific_ids"] && in_array($post_id, preg_split("/[\r\n\t\\s;,]+/", $GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["specific_ids"])) && c_ws_plugin__optimizemember_no_cache::no_cache_constants(true) && !c_ws_plugin__optimizemember_sp_access::sp_access($post_id)) {
                         c_ws_plugin__optimizemember_mo_page::wp_redirect_w_mop_vars("post", $post_id, "sp", $post_id, $_SERVER["REQUEST_URI"], "sp") . exit;
                     }
                 }
             }
             /**/
             do_action("ws_plugin__optimizemember_during_check_post_level_access", get_defined_vars());
         }
     }
     /**/
     do_action("ws_plugin__optimizemember_after_check_post_level_access", get_defined_vars());
     /**/
     return;
     /* For uniformity. */
 }
Пример #3
0
 /**
  * Retrieves a unique array of unavailable Singular IDs that has dripped content set
  *
  * Only returns Singular IDs that require Custom Capabilities;
  * 	and ONLY those which are NOT satisfied by ``$user``.
  *
  * @package optimizeMember\Utilities
  * @since 111101
  *
  * @param obj $user Optional. A `WP_User` object. If this is a valid `WP_User` object, test against this ``$user``, else all are unavailable.
  * @return array Unique array of all Singular IDs *( as integers )* NOT available to ``$user``, due to drp content rules
  */
 public static function get_unavailable_singular_ids_with_dripped_content($user = FALSE)
 {
     global $wpdb;
     /* Need this global DB object reference here. */
     /**/
     if (is_array($results = $wpdb->get_results("SELECT `post_id`, `meta_value` FROM `" . $wpdb->postmeta . "` WHERE `meta_key` = 'optimizemember_drip_days' AND `meta_value` != ''"))) {
         foreach ($results as $r) {
             if (!is_object($user) || empty($user->ID)) {
                 /* No ``$user`` object? Maybe not logged-in?. */
                 $singular_ids[] = (int) $r->post_id;
             } else {
                 if ($drips = $r->meta_value) {
                     $time = optimizemember_paid_registration_time('level' . OPTIMIZEMEMBER_CURRENT_USER_ACCESS_LEVEL);
                     if ($time && $time >= ($_days_ago = strtotime("-{$drips} days"))) {
                         $singular_ids[] = (int) $r->post_id;
                         /* It's NOT available. */
                     }
                 }
             }
         }
     }
     return !empty($singular_ids) && is_array($singular_ids) ? array_unique($singular_ids) : array();
 }
Пример #4
0
    /**
     *
     * Shortcode parsing method for Membership page listings
     * @param array $atts
     */
    function membership_page_listings($atts)
    {
        extract(shortcode_atts(array('style' => '', 'columns' => 1, 'product' => 0, 'category' => 0, 'subcategory' => 0, 'comments' => 0, 'drip_content' => 0, 'resize_thumb_height' => 0, 'show_children' => '', 'order' => '', 'hide_description' => 'N'), $atts));
        $product = intval($product);
        $category = intval($category);
        $subcategory = intval($subcategory);
        $parentId = 0;
        $page_id = defined('OP_PAGEBUILDER_ID') ? OP_PAGEBUILDER_ID : $post->ID;
        $title_font = op_asset_font_style($atts);
        if (!empty($title_font)) {
            $title_style = "style='" . $title_font . "'";
        } else {
            $title_style = '';
        }
        $content_font = op_asset_font_style($atts, 'content_font_');
        if (!empty($content_font)) {
            $content_style = "style='" . $content_font . "'";
        } else {
            $content_style = '';
        }
        // which children should we take?
        if (!empty($show_children)) {
            $parentId = $page_id;
        } else {
            if (!empty($product) && empty($category) && empty($subcategory)) {
                $parentId = $product;
            } else {
                if (!empty($product) && !empty($category) && empty($subcategory)) {
                    $parentId = $category;
                } else {
                    if (!empty($product) && !empty($category) && !empty($subcategory)) {
                        $parentId = $subcategory;
                    }
                }
            }
        }
        if (!empty($order)) {
            $temp = explode('|', $order);
            $order_column = $temp[0];
            $order_direction = $temp[1];
        } else {
            $order_column = 'post_title';
            $order_direction = 'asc';
        }
        $args = array('posts_per_page' => -1, 'sort_column' => $order_column, 'sort_order' => $order_direction, 'parent' => $parentId, 'hierarchical' => 0, 'post_status' => 'publish');
        $pages = get_pages($args);
        if (!empty($resize_thumb_height)) {
            $img_class = ' thumb_resize ';
        } else {
            $img_class = '';
        }
        if (empty($pages) || $parentId == 0) {
            if (is_admin()) {
                return __('No child membership pages found!', OP_SN);
            }
        }
        $html = '';
        switch ($columns) {
            case 1:
                $class = 'page-listing one-col';
                break;
            case 2:
                $class = 'page-listing two-col';
                break;
            case 3:
                $class = 'page-listing three-col';
                break;
            case 4:
                $class = 'page-listing four-col';
                break;
        }
        foreach ($pages as $page) {
            if (defined("WS_PLUGIN__OPTIMIZEMEMBER_VERSION")) {
                if (!is_permitted_by_optimizemember($page->ID, "page")) {
                    continue;
                }
            }
            // drip content
            $dripContentHtml = '';
            if (!empty($drip_content) && defined("WS_PLUGIN__OPTIMIZEMEMBER_VERSION")) {
                $drip_days = get_post_meta($page->ID, "optimizemember_drip_days", true);
                if ($drip_days) {
                    if ($array = is_page_protected_by_optimizemember($page->ID)) {
                        // is it protected?
                        $time = optimizemember_paid_registration_time();
                        if (!empty($time) && $time > strtotime("-" . $drip_days . " days")) {
                            $daysTo = intval(($time + $drip_days * 86400 - time()) / 86400);
                            $dripContentHtml = '<p class="pagelisting-drip-content">' . $daysTo . ' days to see this content.</p>';
                        }
                    }
                }
            }
            $meta = get_post_meta($page->ID);
            if (!empty($meta['_' . OP_SN . '_page_thumbnail'])) {
                $image = $meta['_' . OP_SN . '_page_thumbnail'][0];
                $alt = $page->post_title;
            }
            if (!empty($comments)) {
                $comments = wp_count_comments($page->ID);
                $commentCount = $comments->approved;
                $commentHtml = '<p class="pagelisting-comment">' . $commentCount . ' comments</p>';
            } else {
                $commentHtml = '';
            }
            $meta = $meta['_' . OP_SN . '_membership'][0];
            $meta = unserialize(unserialize($meta));
            $html .= '<div class="' . $class . '">';
            $html .= '
				<a href="' . get_permalink($page->ID) . '" class="pagelisting-style-' . $style . ' border">
					<div class="thumb">';
            if ($image != '') {
                $html .= '<img src="' . $image . '" alt="' . $alt . '" class="scale-with-grid ' . $img_class . '" />';
            } else {
                $html .= '<img src="' . OP_IMG . 'default-page-listings.png" alt="' . $alt . '" class="scale-with-grid ' . $img_class . '" />';
            }
            $html .= '</div>
					<div class="content">
						<h3 ' . $title_style . '>' . $page->post_title . '</h3>' . $commentHtml . $dripContentHtml;
            if ($hide_description !== 'Y') {
                $description = stripslashes(base64_decode($meta['description']));
                if (strlen($description) > 140) {
                    $html .= '<p ' . $content_style . '>' . substr($description, 0, 140) . '...</p>';
                } else {
                    $html .= '<p ' . $content_style . '>' . $description . '</p>';
                }
            }
            $html .= '</div>
				</a>
			';
            $html .= '</div>';
        }
        $html .= '<script type="text/javascript"> function resizeWindow(){if(jQuery(window).width()>=767){jQuery(".container").each(function(){var e=0;var t=jQuery(this).find(".border");t.css({height:"auto"});t.each(function(){var t=jQuery(this).height();if(t>e)e=t});t.height(e)})}}jQuery(document).ready(function(){jQuery(window).bind("resize",resizeWindow);jQuery(window).bind("load",resizeWindow)}) </script>' . "\n";
        return $html;
    }