Example #1
0
 function render_photoAlbum(array $info = array())
 {
     // add admin edit.
     global $locale, $gallery_settings;
     echo "<div class='panel panel-default'>\n";
     echo "<div class='panel-heading'>\n";
     echo "<a title='" . $locale['430'] . "' href='" . $info['album_link']['link'] . "'>\n<strong>" . trim_text($info['album_link']['name'], 18) . "</strong>\n</a>\n";
     echo "</div>\n";
     echo "<div class='overflow-hide' style='background: #ccc; height: " . ($gallery_settings['thumb_h'] - 15) . "px'>\n";
     echo $info['image'];
     echo "</div>\n";
     echo "<div class='panel-body'>\n";
     echo "<span class='album_count'>" . $info['photo_rows'] . " " . ($info['photo_rows'] > 1 ? $locale['462'] : $locale['461']) . "</span>";
     echo "</div>\n";
     echo "<div class='panel-footer'>\n";
     echo "<abbr title='" . $locale['464'] . showdate("shortdate", $info['album_datestamp']) . "'><i class='entypo calendar text-lighter'></i></abbr> " . timer($info['album_datestamp']) . "";
     if (!empty($info['album_edit']) && !empty($info['album_delete'])) {
         echo "</div>\n<div class='panel-footer'>\n";
         echo "<a class='btn btn-default' href='" . $info['album_edit']['link'] . "' title='" . $info['album_edit']['name'] . "'><i class='fa fa-edit fa-lg'></i></a>\n";
         echo "<a class='btn btn-danger' href='" . $info['album_delete']['link'] . "' title='" . $info['album_delete']['name'] . "'><i class='fa fa-trash fa-lg'></i></a>\n";
     }
     echo "</div></div>\n";
 }
Example #2
0
 private function parseDescription($text)
 {
     if ($this->content === 'getVideoEntry') {
         return $text;
     } else {
         return trim_text($text, 90);
     }
 }
Example #3
0
function show_faq($faq_cat_id, $total_faq_count)
{
    global $locale, $aidlink, $show_faqs;
    // xss
    $_GET['faq_start'] = isset($_GET['faq_start']) && isnum($_GET['faq_start']) && $_GET['faq_start'] <= $total_faq_count ? $_GET['faq_start'] : 0;
    echo "<tr id='faq_" . $faq_cat_id . "' class='faq_list'>\n<td colspan='4'>\n";
    echo "<div class='panel panel-default'>\n";
    echo "<div class='panel-body'>\n";
    // need to improve a faq ordering .. it's hard manage content
    $result2 = dbquery("SELECT faq_id, faq_question, faq_answer\n\t\t\tFROM " . DB_FAQS . " WHERE faq_cat_id='" . intval($faq_cat_id) . "'\n\t\t\tORDER BY faq_id\n\t\t\tlimit " . intval($_GET['faq_start']) . ", " . intval($show_faqs) . "\n\t\t\t");
    $faq_rows = dbrows($result2);
    if ($faq_rows) {
        echo "<table class='table table-responsive table-hover table-striped'>\n";
        echo "<tr><th colspan='2' style='border-top:0;'>\n";
        echo "<div class='pull-right'>" . sprintf($locale['faq_0114'], $faq_rows, $total_faq_count) . "</div>\n";
        if ($total_faq_count > $faq_rows) {
            echo makepagenav($_GET['faq_start'], $show_faqs, $total_faq_count, 3, FUSION_SELF . $aidlink . "&amp;show_faq=" . $faq_cat_id . "&amp;", "faq_start");
        }
        echo "</td></th>\n";
        echo "<tbody>\n";
        while ($data2 = dbarray($result2)) {
            echo "<tr>\n<td>\n\n\t\t\t\t\t<strong>" . $locale['faq_0110'] . " " . $data2['faq_question'] . "</strong><br/>\n\n\t\t\t\t\t<strong>" . $locale['faq_0111'] . "</strong>" . trim_text(parse_textarea($data2['faq_answer']), 60) . "<br/>\n\n\t\t\t\t\t</td>\n";
            echo "<td align='right'>\n<a href='" . FUSION_SELF . $aidlink . "&amp;action=edit&amp;faq_cat_id=" . $faq_cat_id . "&amp;faq_id=" . $data2['faq_id'] . "&amp;section=faqs'>" . $locale['faq_0107'] . "</a> -\n";
            echo "<a href='" . FUSION_SELF . $aidlink . "&amp;action=delete&amp;faq_cat_id=" . $faq_cat_id . "&amp;faq_id=" . $data2['faq_id'] . "&amp;section=faqs' onclick=\"return confirm('" . $locale['faq_0112'] . "');\">" . $locale['faq_0108'] . "</a></td>\n";
            echo "</tr>\n";
        }
        echo "</tbody>\n</table>\n";
    } else {
        echo $locale['faq_0113'];
    }
    echo "</div>\n</div></td></tr>";
}
Example #4
0
    /**
     * Widget
     *
     * Display the widget in the sidebar
     * Save output to the cache if empty
     *
     * @param	array	sidebar arguments
     * @param	array	instance
     */
    public function widget($args, $instance)
    {
        // Get the widget cache from the transient
        $cache = get_transient('asp_widget_cache');
        // If this category widget instance is cached, get from the cache
        /*if ( isset( $cache[$this->id] ) ) {
        			echo $cache[$this->id];
        			return false;
        		}*/
        // Otherwise Start buffering and output the Widget
        ob_start();
        extract($args);
        // Set the widget title
        $title = apply_filters('widget_title', $instance['title'] ? $instance['title'] : __('Product Category', 'asp'), $instance, $this->id_base);
        // Get options
        $cat1 = isset($instance['cat1']) ? $instance['cat1'] : 0;
        $cat2 = isset($instance['cat2']) ? $instance['cat2'] : 0;
        $cat3 = isset($instance['cat3']) ? $instance['cat3'] : 0;
        $cat4 = isset($instance['cat4']) ? $instance['cat4'] : 0;
        $cat5 = isset($instance['cat5']) ? $instance['cat5'] : 0;
        $cat6 = isset($instance['cat6']) ? $instance['cat6'] : 0;
        $cat7 = isset($instance['cat7']) ? $instance['cat7'] : 0;
        $cat8 = isset($instance['cat8']) ? $instance['cat8'] : 0;
        $cat9 = isset($instance['cat9']) ? $instance['cat9'] : 0;
        $cat10 = isset($instance['cat10']) ? $instance['cat10'] : 0;
        $cat11 = isset($instance['cat11']) ? $instance['cat11'] : 0;
        $cat12 = isset($instance['cat12']) ? $instance['cat12'] : 0;
        // Print the widget wrapper & title
        echo $before_widget;
        echo $before_title . $title . $after_title;
        //echo "<ul>";
        for ($i = 1; $i < 13; $i++) {
            $a = 'cat' . $i;
            $term = get_term(${$a}, 'product_cat');
            if ($term && !is_wp_error($term)) {
                $thumbnail_id = get_woocommerce_term_meta($term->term_id, 'thumbnail_id', true);
                $image = wp_get_attachment_url($thumbnail_id);
                if (empty($image)) {
                    $image = plugins_url() . '/ASP_plugin/images/no_cat_thumb.png';
                }
                ?>
            <div title="<?php 
                echo $term->name;
                ?>
" class="asp-product-category">
            	<a href="<?php 
                echo get_term_link($term->slug, 'product_cat');
                ?>
"><img src="<?php 
                echo $image;
                ?>
" style="width:150px;height:87px;" /></a>
                <div title="<?php 
                echo $term->name;
                ?>
" class="asp-product-category-title-bar"><?php 
                echo trim_text($term->name, 27);
                ?>
</div>
            </div>
            <?php 
            }
        }
        //echo "</ul>";
        // Print closing widget wrapper
        echo $after_widget;
        // Flush output buffer and save to transient cache
        $result = ob_get_flush();
        $cache[$this->id] = $result;
        set_transient('asp_widget_cache', $cache, 3600 * 3);
        // 3 hours ahead
    }
Example #5
0
function format_text($text)
{
    $text = html_entity_decode($text);
    $enter = array("\r", "<br />", "<br>", "<br/>", "<p>", "</p>");
    $text = str_replace($enter, "\n", $text);
    $words = array(" ", "", "&quot;", "&lt;", "&gt;", "&amp;", "&reg;", "&copy;", "&#174;", "&#169;");
    $text = str_replace($words, "", $text);
    $text = trim($text);
    $text = trim_text($text);
    $text = str_replace("\n \n", "\n", $text);
    $text = trim_dot($text);
    //$text = trim_period($text);
    $text = trim_sigh($text);
    $text = trim_dot_zh($text);
    $text = trim_period_zh($text);
    $text = trim_sigh_zh($text);
    $text = build_text($text);
    $text = "  " . $text;
    $text = str_replace("\n", "\n\n  ", $text);
    $text = str_replace("   ", "  ", $text);
    $text = nl2br($text);
    return $text;
}
Example #6
0
File: list.php Project: Simo22/smt2
 $list .= '<tr>';
 $list .= '<th>user</th>';
 $list .= '<th>time</th>';
 $list .= '<th>content</th>';
 $list .= '<th>action</th>';
 $list .= '</tr>';
 $list .= '</thead>';
 $list .= '<tbody>';
 foreach ($notes as $note) {
     $user = db_select(TBL_PREFIX . TBL_USERS, "login", "id='" . $note['uid'] . "'");
     // build row
     $list .= '<tr>';
     $list .= '<td>' . $user['login'] . '</td>';
     $qs = array('id' => $id, 'start' => $note['pos']);
     $list .= '<td><a href="../track.php?' . http_build_query($qs) . '" class="track">' . $note['pos'] . '</a></td>';
     $list .= '<td>' . trim_text(strip_tags($note['txt']), 10) . '</td>';
     $list .= '<td>';
     $qs = array('id' => $id, 'login' => $user['login'], 'time' => $note['pos']);
     $list .= '<a href="read.php?' . http_build_query($qs) . '">read</a>';
     if ($_SESSION['login'] == $user['login'] || is_admin()) {
         $list .= ' | <a href="edit.php?' . http_build_query($qs) . '">edit</a>';
     }
     if (is_root()) {
         $list .= ' | <a class="conf" href="delete.php?' . http_build_query($qs) . '">delete</a>';
     }
     $list .= '</td>';
     $list .= '</tr>';
 }
 $list .= '</tbody>';
 $list .= '</table>';
 echo $list;
Example #7
0
        $last_blogs[$row['blog_id']] = $row;
    }
    $db->sql_freeresult($result);
}
gen_sort_selects($limit_days, $sort_by_text, $sort_days, $sort_key, $sort_dir, $s_limit_days, $s_sort_key, $s_sort_dir, $u_sort_param);
$pagination = generate_blog_pagination($blog_urls['start_zero'], $total, $limit, $start, false);
generate_blog_breadcrumbs($user->lang['USERLIST']);
// Generate the left menu
generate_menu();
page_header($user->lang['BLOG'] . ' ' . $user->lang['USERLIST']);
// Output some data
$template->assign_vars(array('FOLDER_IMG' => $user->img('forum_read', ''), 'FORUM_FOLDER_IMG_SRC' => $user->img('forum_read', '', false, '', 'src'), 'PAGINATION' => $pagination, 'PAGE_NUMBER' => on_page($total, $limit, $start), 'TOTAL_POSTS' => $total == 1 ? $user->lang['ONE_BLOG'] : sprintf($user->lang['CNT_BLOGS'], $total), 'S_SORT' => true, 'S_SELECT_SORT_DIR' => $s_sort_dir, 'S_SELECT_SORT_KEY' => $s_sort_key, 'S_SELECT_SORT_DAYS' => $s_limit_days));
unset($pagination);
$i = -1;
foreach ($users as $row) {
    $i++;
    if ($i < $start) {
        continue;
    } else {
        if ($i >= $start + $limit) {
            break;
        }
    }
    $user_id = $row['user_id'];
    $last_blog = $last_blogs[$row['blog_id']];
    $blog_text = trim_text($last_blog['blog_text'], $last_blog['bbcode_uid'], $config['user_blog_text_limit'], $last_blog['bbcode_bitfield'], $last_blog['enable_bbcode']);
    $bbcode_options = ($last_blog['enable_bbcode'] ? OPTION_FLAG_BBCODE : 0) + ($last_blog['enable_smilies'] ? OPTION_FLAG_SMILIES : 0) + ($last_blog['enable_magic_url'] ? OPTION_FLAG_LINKS : 0);
    $blog_text = generate_text_for_display($blog_text, $last_blog['bbcode_uid'], $last_blog['bbcode_bitfield'], $bbcode_options);
    $template->assign_block_vars('userrow', array('BLOG_COUNT' => $row['blog_count'], 'BLOG_TITLE' => $row['title'] ? censor_text($row['title']) : sprintf($user->lang['USERNAMES_BLOGS'], $row['username']), 'USERNAME' => get_username_string('full', $user_id, $row['username'], $row['user_colour']), 'LAST_BLOG' => $blog_text, 'LAST_BLOG_SUBJECT' => censor_text($last_blog['blog_subject']), 'LAST_BLOG_TIME' => $user->format_date($last_blog['blog_time']), 'U_VIEW_BLOG' => blog_url($user_id), 'U_VIEW_LAST_BLOG' => blog_url($user_id, $last_blog['blog_id'])));
}
$template->set_filenames(array('body' => 'blog/userlist.html'));
Example #8
0
" >
                <?php 
        if ($sale['from_api'] == 0) {
            $image_path_original = other_asset_url($sale['product_image'] . '_m.' . $sale['product_ext'], '', 'uploads/images/products');
        } else {
            $image_path_original = str_replace('160', '440', $sale['product_image']);
        }
        ?>
                <img src="<?php 
        echo $image_path_original;
        ?>
"  alt=""> </a>
                <div class="clear"></div>
                <p>
                  <?php 
        echo trim_text(strip_tags($sale['product_name']), 25);
        ?>
                </p>
                <span class="clear"></span>
                <?php 
        if ($sale['sale_type_id'] == 5) {
            $new_value = $sale['sale_value'];
            $off_percentage = $sale['api_reduction_percent'];
        } else {
            $new_value = $sale['sale_price'];
            $off_percentage = 100 - $sale['sale_price'] * 100 / $sale['product_price'];
        }
        ?>
                <span style="float:left;"> Före:
                <?php 
        echo makeCurrency($sale['product_price']);
Example #9
0
    public function index()
    {
        $cat_id = $_GET['cat_id'];
        $config['base_url'] = base_url() . 'category/?cat_id=' . $_GET['cat_id'];
        $config['total_rows'] = $this->product_model->total_product_by_category($_GET['cat_id']);
        $config['per_page'] = 20;
        $config['uri_segment'] = isset($_GET['per_page']) ? $_GET['per_page'] : 9;
        $this->pagination->initialize($config);
        $offset = $config['uri_segment'];
        $limit = $config['per_page'];
        $config['enable_query_strings'] = TRUE;
        $config['page_query_string'] = TRUE;
        $this->pagination->initialize($config);
        $products = $this->product_model->product_by_category($cat_id, $limit, $offset);
        $pro_html = '';
        if ($products) {
            foreach ($products as $products) {
                if ($products['product_image']) {
                    $image_path_original = other_asset_url($products['product_image'] . '_m.' . $products['product_ext'], '', 'uploads/images/products');
                }
                $iarr = @getimagesize($image_path_original);
                if (!is_array($iarr)) {
                    $image_path_original = image_asset_url('no_image.gif');
                }
                $img_featue = 'header.jpg';
                $heart_class = '<div class="heart" rel="' . $products['pro_id'] . '" id="wish_heart_' . $products['pro_id'] . '" style="display:none">
										' . image_asset($img_featue) . '
									</div>';
                $whislist_detail = $this->wishlist_model->get_wishlist_detail_product($products['pro_id']);
                if ($this->wishlist_model->get_wishlist_detail_product($products['pro_id'])) {
                    $img_featue = 'heart_red.jpg';
                    $heart_class = '<div class="heartred" rel="' . $products['pro_id'] . '" id="wish_heart_' . $products['pro_id'] . '">
										' . image_asset($img_featue) . '
									</div>';
                }
                $sale_tag = '';
                if ($products['sale_type_id'] == '1') {
                    $sale_tag = '<span style="float:left;"> Before: ' . round($products['product_price']) . ' kr
							<br>
							<label style="color:red">Now: ' . round($products['sale_value']) . ' kr</label> </span>
							<div class="persentage_imgs">
								-' . round(100 - $products['sale_value'] / $products['product_price'] * 100) . '%
							</div>';
                } elseif ($products['sale_type_id'] == '2') {
                    $now_price = $products['product_price'] * ($products['sale_value'] / 100);
                    $sale_tag = '<span style="float:left;"> Before: ' . round($products['product_price']) . ' kr
							<br>
							<label style="color:red">Now: ' . round($products['product_price'] - $now_price) . ' kr</label> </span>
							<div class="persentage_imgs">
										-' . round($products['sale_value']) . '%
							</div><!--persentage_img-->';
                } else {
                    $sale_tag = '<span style="float:left;"> 
							<label style="color:red">Now:' . round($products['product_price']) . ' kr</label> </span>';
                    if ($products['sale_type_id'] == '3') {
                        $sale_tag .= '<br /><span style="float:left;"><label> Buy 1 get ' . $products['sale_value'] . ' free</label></span>';
                    }
                    if ($products['sale_type_id'] == '4') {
                        $deals = explode('_', $products['sale_value']);
                        $sale_tag .= '<span style="float:left;"><label >Buy ' . $deals[0] . ' and pay for ' . $deals[1] . '</label></span>';
                    }
                }
                $pro_html .= '<div class="cata_pro product_detail" rel="' . $products['pro_id'] . '">
									<a id="product_' . $products['pro_id'] . '" href="' . base_url() . 'product/product_detail/' . $products['pro_id'] . '" ><img height="256" width="200" src="' . $image_path_original . '"/></a>
									
									' . $heart_class . '
									<p>
										' . trim_text(strip_tags($products['product_name']), 30) . '
									</p>
									<div class="clear"></div>									
									' . $sale_tag . '
								</div><!--cata_pro-->';
            }
        } else {
            $pro_html .= '<div class="cata_pro"><p>Sorry No Record Yet!</p></div>';
        }
        $cat_id = $this->input->get("cat_id");
        $data['category_name'] = get_categroy_name($cat_id);
        $data['category_detail'] = $this->categories_model->get_category_detail($cat_id);
        $data['product_category'] = get_product_oncategory($cat_id);
        //$data['product_category']  = '';
        $data['other_choice'] = other_choice_category();
        $data['related_categories'] = related_categories($cat_id);
        $data['sales_to_missed'] = sales_not_missed();
        $data['products'] = $pro_html;
        $data['pagination'] = $this->pagination->create_links();
        $data['query_params'] = $this->input->get();
        $data['total_records'] = $config['base_url'];
        $this->load->view('main/category.html', $data);
    }
Example #10
0
        <?php 
    if (!empty($comments)) {
        ?>
        <div class='user-comments'>
            <h3>Kommentarer</h3>
                <ul class="fa-ul">
                    <?php 
        foreach ($comments as $comment) {
            ?>
                    <li>
                        <a href='<?php 
            echo $this->url->create("forum/view/{$comment->question_id}/#comment-{$comment->id}");
            ?>
'>
                            <i class="fa-li fa fa-commenting"></i> <?php 
            echo trim_text($comment->content, 149);
            ?>
                        </a>
                    </li>    
                    <?php 
        }
        ?>
                </ul>
        </div>       
        <hr>
        <?php 
    }
    ?>
        
        <?php 
    if (!empty($voteCount[0]->sum)) {
Example #11
0
 /**
  * This function will retrieve related videos according to its id or some of its tags
  *
  * @param string $origId The id for which to look for data
  * @return the php response from parsing the data.
  */
 private function _relatedVideos($api, $origId = null)
 {
     $this->apiprocessing->content = 'getRelatedVideos';
     $this->apiprocessing->maxResults = 8;
     // $this->apiprocessing->api = $api;
     // $this->apiprocessing->videoId = $origId;
     $results = $this->apiprocessing->individualCall($api);
     // $results = $this->apiprocessing->parseApiResult($api, $results);
     // dd($results);
     $related = [];
     switch ($api) {
         case 'Dailymotion':
             $i = 0;
             // dd($results);
             foreach ($results['list'] as $video) {
                 preg_match('@video/([^_]+)_([^/]+)@', $video['url'], $match);
                 $url = $match[1] . '/' . $match[2];
                 $url = site_url('video/' . substr($url, 0, 1) . 'd' . substr($url, 1));
                 $httpsUrl = preg_replace("/^http:/i", "https:", $url);
                 $related[$i]['url'] = $url;
                 $thumbnailUrl = preg_replace("/^http:/i", "https:", $video['thumbnail_240_url']);
                 $related[$i]['img'] = $thumbnailUrl;
                 $related[$i]['title'] = $video['title'];
                 $related[$i]['source'] = 'Dailymotion';
                 $i++;
             }
             break;
         case "Metacafe":
             $i = 0;
             foreach ($results->channel->item as $video) {
                 preg_match('/http:\\/\\/[w\\.]*metacafe\\.com\\/watch\\/([^?&#"\']*)/is', $video->link, $match);
                 $id = substr($match[1], 0, -1);
                 $url = site_url('video/' . substr($id, 0, 1) . 'M' . substr($id, 1));
                 $related[$i]['url'] = $url;
                 $related[$i]['title'] = trim_text($video->title, 83);
                 $related[$i]['img'] = "http://www.metacafe.com/thumb/{$video->id}.jpg";
                 $related[$i]['source'] = 'Metacafe';
                 $i++;
             }
             break;
         case "Vimeo":
             $i = 0;
             foreach ($results['body']['data'] as $video) {
                 $origid = explode('/', $video['uri'])[2];
                 $id = substr($origid, 0, 1) . 'v' . substr($origid, 1);
                 $url = site_url('video/' . $id);
                 $related[$i]['url'] = $url;
                 $related[$i]['title'] = trim_text($video['name'], 83);
                 $related[$i]['img'] = $video['pictures']['sizes'][2]['link'];
                 $related[$i]['source'] = 'Metacafe';
                 $i++;
             }
             break;
         case 'YouTube':
             $i = 0;
             foreach ($results['feed']['entry'] as $video) {
                 $origid = substr($video['id']['$t'], strrpos($video['id']['$t'], '/') + 1);
                 $id = substr($origid, 0, 1) . 'y' . substr($origid, 1);
                 $url = site_url('video/' . $id);
                 $related[$i]['url'] = $url;
                 $related[$i]['title'] = trim_text($video['title']['$t'], 83);
                 $thumbnailUrl = preg_replace("/^http:/i", "https:", $video['media$group']['media$thumbnail'][0]['url']);
                 $related[$i]['img'] = $thumbnailUrl;
                 $related[$i]['source'] = 'YouTube';
                 $i++;
             }
             break;
     }
     return $related;
 }
Example #12
0
function scBestSeller()
{
    global $post;
    global $wpdb;
    ?>
    <div class="asp-best-seller">
    <p>OUR CURRENT BEST SELLERS:</p>
<?php 
    $query_args = array('posts_per_page' => 5, 'nopaging' => 0, 'post_status' => 'publish', 'post_type' => 'product', 'meta_key' => '_featured', 'orderby' => 'meta_value');
    $r = new WP_Query($query_args);
    if ($r->have_posts()) {
        ?>
	<!--<ul class="product_list_widget">-->
	<?php 
        while ($r->have_posts()) {
            $r->the_post();
            global $product;
            ?>
    <div class="home-best-seller-item">
	<!--<li>--><a href="<?php 
            the_permalink();
            ?>
" title="<?php 
            echo esc_attr(get_the_title() ? get_the_title() : get_the_ID());
            ?>
">
		<?php 
            //if (has_post_thumbnail()) the_post_thumbnail('shop_thumbnail'); else echo '<img src="'. woocommerce_placeholder_img_src() .'" alt="Placeholder" width="'.$woocommerce->get_image_size('shop_thumbnail_image_width').'" height="'.$woocommerce->get_image_size('shop_thumbnail_image_height').'" />';
            ?>
		<div class="home-best-seller-img-outline"><?php 
            if (has_post_thumbnail()) {
                the_post_thumbnail('large', array('style' => 'width:150px; height:87px;'));
            } else {
                echo '<img src="' . woocommerce_placeholder_img_src() . '" alt="Placeholder" style="width:150px; height:87px;"  />';
            }
            ?>
</div>
        </a>
        <div class="paper-shadow"></div>
	<p><a href="<?php 
            the_permalink();
            ?>
" title="<?php 
            if (get_the_title()) {
                the_title();
            } else {
                the_ID();
            }
            ?>
"><?php 
            if (get_the_title()) {
                echo trim_text(get_the_title(), 24, true, false);
            } else {
                the_ID();
            }
            ?>
</a><br/>
    <span style="color:#000000;">
		<?php 
            if (!empty($product->price)) {
                echo 'ONLY ' . $product->get_price_html();
            } else {
                echo $product->get_price_html();
            }
            ?>
    </span>
    </p><!--</li>-->
    
    </div>
	<?php 
        }
        ?>
	<!--</ul>-->
	<?php 
    }
    ?>
	</div>
    <div style="clear:both"></div>
<?php 
}
Example #13
0
    function simplexml_unCDATAise($xml)
    {
        $new_xml = NULL;
        preg_match_all("/\\<\\!\\[CDATA\\[(.*)\\]\\]\\>/U", $xml, $args);
        if (is_array($args)) {
            if (isset($args[0]) && isset($args[1])) {
                $new_xml = $xml;
                for ($i = 0; $i < count($args[0]); $i++) {
                    $old_text = $args[0][$i];
                    $new_text = htmlspecialchars($args[1][$i]);
                    $new_xml = str_replace($old_text, $new_text, $new_xml);
                }
            }
        }
        return $new_xml;
    }
    $tag = mysql_real_escape_string($_GET['load']);
    $xmlFile = '../../../cache/xml/feeds_' . $tag . '.xml';
    $xml = simplexml_load_file($xmlFile);
    echo wrt_table(0, 0, 0, '100%', 'center');
    $items = $xml->item;
    foreach ($items as $item) {
        echo '<tr>';
        echo '<th class="ft_head font_m left"><a href="' . $item->link . '" target="_blank">' . $item->title . '</a></th>';
        echo '</tr><tr>';
        echo '<td class="font_s">' . trim_text($item->description, 240) . '</td>';
        echo '</tr>';
        echo '<tr><td>&nbsp;</td></tr>';
    }
    echo '</table>';
}
 function lorem_ipsum($length)
 {
     $text = "\n\t<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum aliquam felis nunc, in dignissim metus suscipit eget. Nunc scelerisque laoreet purus, in ullamcorper magna sagittis eget. Aliquam ac rhoncus orci, a lacinia ante. Integer sed erat ligula. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Fusce ullamcorper sapien mauris, et tempus mi tincidunt laoreet. Proin aliquam vulputate felis in viverra.</p>\n\t<p>Duis sed lorem vitae nibh sagittis tempus sed sed enim. Mauris egestas varius purus, a varius odio vehicula quis. Donec cursus interdum libero, et ornare tellus mattis vitae. Phasellus et ligula velit. Vivamus ac turpis dictum, congue metus facilisis, ultrices lorem. Cras imperdiet lacus in tincidunt pellentesque. Sed consectetur nunc vitae fringilla volutpat. Mauris nibh justo, luctus eu dapibus in, pellentesque non urna. Nulla ullamcorper varius lacus, ut finibus eros interdum id. Proin at pellentesque sapien. Integer imperdiet, sapien nec tristique laoreet, sapien lacus porta nunc, tincidunt cursus risus mauris id quam.</p>\n\t<p>Ut vulputate mauris in facilisis euismod. Ut id libero vitae neque laoreet placerat a id mi. Integer ornare risus placerat, interdum nisi sed, commodo ligula. Integer at ipsum id magna blandit volutpat. Sed euismod mi odio, vitae molestie diam ornare quis. Aenean id ligula finibus, convallis risus a, scelerisque tellus. Morbi quis pretium lectus. In convallis hendrerit sem. Vestibulum sed ultricies massa, ut tempus risus. Nunc aliquam at tellus quis lobortis. In hac habitasse platea dictumst. Vestibulum maximus, nibh at tristique viverra, eros felis ultrices nunc, et efficitur nunc augue a orci. Phasellus et metus mauris. Morbi ut ex ut urna tincidunt varius eu id diam. Aenean vestibulum risus sed augue vulputate, a luctus ligula laoreet.</p>\n\t<p>Nam tempor sodales mi nec ullamcorper. Mauris tristique ligula augue, et lobortis turpis dictum vitae. Aliquam leo massa, posuere ac aliquet quis, ultricies eu elit. Etiam et justo et nulla cursus iaculis vel quis dolor. Phasellus viverra cursus metus quis luctus. Nulla massa turpis, porttitor vitae orci sed, laoreet consequat urna. Etiam congue turpis ac metus facilisis pretium. Nam auctor mi et auctor malesuada. Mauris blandit nulla quis ligula cursus, ut ullamcorper dui posuere. Fusce sed urna id quam finibus blandit tempus eu tellus. Vestibulum semper diam id ante iaculis iaculis.</p>\n\t<p>Fusce suscipit maximus neque, sed consectetur elit hendrerit at. Sed luctus mi in ex auctor mollis. Suspendisse ac elementum tellus, ut malesuada purus. Mauris condimentum elit at dolor eleifend iaculis. Aenean eget faucibus mauris. Pellentesque fermentum mattis imperdiet. Donec mattis nisi id faucibus finibus. Vivamus in eleifend lorem, vel dictum nisl. Morbi ut mollis arcu.</p>\n\t";
     return trim_text($text, $length);
 }
Example #15
0
    public function index()
    {
        $query_params = $this->input->get();
        $tmp_url = '';
        if (isset($query_params['brand'])) {
            $tmp_url .= "&brand=" . $query_params['brand'];
        }
        if (isset($query_params['min_price'])) {
            $tmp_url .= "&min_price=" . $query_params['min_price'];
        }
        if (isset($query_params['max_price'])) {
            $tmp_url .= "&max_price=" . $query_params['max_price'];
        }
        $cat_id = $_GET['cat_id'];
        $config['base_url'] = base_url() . 'category/?cat_id=' . $_GET['cat_id'] . $tmp_url;
        $config['total_rows'] = $this->product_model->total_product_by_category($_GET['cat_id']);
        $config['per_page'] = 24;
        $config['prev_link'] = '&lt; Föregående';
        $config['next_link'] = 'Nästa &gt;';
        $config['uri_segment'] = isset($_GET['per_page']) ? $_GET['per_page'] : 0;
        //$this->pagination->initialize($config);
        $offset = $config['uri_segment'];
        $limit = $config['per_page'];
        $config['enable_query_strings'] = TRUE;
        $config['page_query_string'] = TRUE;
        $this->pagination->initialize($config);
        $products = $this->product_model->product_by_category($cat_id, $limit, $offset);
        $pro_html = '';
        if ($products) {
            foreach ($products as $products) {
                if ($products['from_api'] == 0) {
                    $image_path_original = other_asset_url($products['product_image'] . '_m.' . $products['product_ext'], '', 'uploads/images/products');
                } else {
                    $image_path_original = str_replace('440', '220', $products['product_image']);
                }
                //        echo $image_path_original ;
                //$iarr = @getimagesize($image_path_original);
                //if(!is_array($iarr)){
                //$image_path_original = image_asset_url('no_image.gif');
                //      }
                $img_featue = 'header.jpg';
                $heart_class = '<div class="heart" rel="' . $products['pro_id'] . '" id="wish_heart_' . $products['pro_id'] . '" style="display:none">
										' . image_asset($img_featue) . '
									</div>';
                $whislist_detail = $this->wishlist_model->get_wishlist_detail_product($products['pro_id']);
                if ($this->wishlist_model->get_wishlist_detail_product($products['pro_id'])) {
                    $img_featue = 'heart_red.jpg';
                    $heart_class = '<div class="heartred" rel="' . $products['pro_id'] . '" id="wish_heart_' . $products['pro_id'] . '">
										' . image_asset($img_featue) . '
									</div>';
                }
                $sale_tag = '';
                if ($products['sale_type_id'] == '1') {
                    $sale_tag = '<span style="float:left;"> Före: ' . makeCurrency($products['product_price']) . ' kr
							<br>
							<label style="color:red">Nu: ' . makeCurrency($products['sale_value']) . ' kr</label> </span>
							<div class="persentage_imgs">
								-' . makeCurrency(100 - $products['sale_value'] / $products['product_price'] * 100) . '%
							</div>';
                } elseif ($products['sale_type_id'] == '5') {
                    $sale_tag = '<span style="float:left;"> Före: ' . makeCurrency($products['product_price']) . ' kr
							<br>
							<label style="color:red">Nu: ' . makeCurrency($products['sale_price']) . ' kr</label> </span>
							<div class="persentage_imgs">
								-' . $products['api_reduction_percent'] . '%
							</div>';
                } elseif ($products['sale_type_id'] == '2') {
                    $now_price = $products['product_price'] * ($products['sale_value'] / 100);
                    $sale_tag = '<span style="float:left;"> Före: ' . makeCurrency($products['product_price']) . ' kr
							<br>
							<label style="color:red">Nu: ' . makeCurrency($products['product_price'] - $now_price) . ' kr</label> </span>
							<div class="persentage_imgs">
										-' . makeCurrency($products['sale_value']) . '%
							</div><!--persentage_img-->';
                } else {
                    $sale_tag = '<span style="float:left;"> 
							<label style="color:red">Nu:' . makeCurrency($products['product_price']) . ' kr</label> </span>';
                    if ($products['sale_type_id'] == '3') {
                        $sale_tag .= '<br /><span style="float:left;"><label> Buy 1 get ' . $products['sale_value'] . ' free</label></span>';
                    }
                    if ($products['sale_type_id'] == '4') {
                        $deals = explode('_', $products['sale_value']);
                        $sale_tag .= '<span style="float:left;"><label >Buy ' . $deals[0] . ' and pay for ' . $deals[1] . '</label></span>';
                    }
                }
                $pro_html .= '<div class="cata_pro product_detail" rel="' . $products['pro_id'] . '">
									<a id="product_' . $products['pro_id'] . '" href="' . base_url() . 'product/product_detail/' . $products['pro_id'] . '" ><img src="' . $image_path_original . '"/></a>
									
									' . $heart_class . '
									<p>
										' . trim_text(strip_tags($products['product_name']), 32) . '
									</p>
									<div class="clear"></div>									
									' . $sale_tag . '
								</div><!--cata_pro-->';
            }
        } else {
            $pro_html .= '<div class="cata_pro"><p>Kommer snart! </p></div>';
        }
        $cat_id = $this->input->get("cat_id");
        $data['category_name'] = get_categroy_name($cat_id);
        $data['category_detail'] = $this->categories_model->get_category_detail($cat_id);
        $data['product_category'] = get_product_oncategory($cat_id);
        //$data['product_category']  = '';
        $data['other_choice'] = other_choice_category();
        $data['related_categories'] = related_categories($cat_id);
        $data['sales_to_missed'] = sales_not_missed();
        $data['products'] = $pro_html;
        $data['pagination'] = $this->pagination->create_links();
        $data['query_params'] = $this->input->get();
        $data['total_records'] = $config['total_rows'];
        $this->template->load('responsive/default', 'responsive/category', $data);
        //$this->output->enable_profiler(TRUE);
    }
Example #16
0
    /**
     * Widget
     *
     * Display the widget in the sidebar
     * Save output to the cache if empty
     *
     * @param	array	sidebar arguments
     * @param	array	instance
     */
    public function widget($args, $instance)
    {
        // Get the widget cache from the transient
        $cache = get_transient('asp_widget_cache');
        // If this category widget instance is cached, get from the cache
        /*if ( isset( $cache[$this->id] ) ) {
        			echo $cache[$this->id];
        			return false;
        		}*/
        // Otherwise Start buffering and output the Widget
        ob_start();
        extract($args);
        // Set the widget title
        $title = apply_filters('widget_title', $instance['title'] ? $instance['title'] : __('Services', 'asp'), $instance, $this->id_base);
        // Get options
        $srv1 = isset($instance['srv1']) ? $instance['srv1'] : 0;
        $srv2 = isset($instance['srv2']) ? $instance['srv2'] : 0;
        $srv3 = isset($instance['srv3']) ? $instance['srv3'] : 0;
        $srv4 = isset($instance['srv4']) ? $instance['srv4'] : 0;
        // Print the widget wrapper & title
        echo $before_widget;
        echo $before_title . $title . $after_title;
        global $post;
        for ($i = 1; $i < 5; $i++) {
            $a = 'srv' . $i;
            $post = get_post(${$a});
            ?>
			
        <div class="asp-service" title="<?php 
            echo $post->post_title;
            ?>
">
			<?php 
            if (has_post_thumbnail()) {
                ?>
            <a href="<?php 
                echo get_permalink();
                ?>
"><?php 
                the_post_thumbnail('full', array('style' => 'width:230px;height:128px;', 'title' => ''));
                ?>
</a>
            <?php 
            } else {
                ?>
            <a href="<?php 
                echo get_permalink();
                ?>
"><img src="<?php 
                echo plugins_url() . '/ASP_plugin/images/no_srv_thumb.png';
                ?>
" style="width:230px; height:128px;" /></a>
            <?php 
            }
            ?>
            <div class="asp-service-title-bar" title="<?php 
            echo $post->post_title;
            ?>
"><?php 
            echo trim_text($post->post_title, 32, true, false);
            ?>
</div>
        </div>         
		<?php 
        }
        // Print closing widget wrapper
        echo $after_widget;
        // Flush output buffer and save to transient cache
        $result = ob_get_flush();
        $cache[$this->id] = $result;
        set_transient('asp_widget_cache', $cache, 3600 * 3);
        // 3 hours ahead
    }
Example #17
0
        echo "<td class='tbl2' align='right' style='font-weight:normal;'><a href='" . FUSION_SELF . $aidlink . "&amp;action=edit&amp;faq_cat_id=" . $data['faq_cat_id'] . "&amp;t=cat'>" . $locale['542'] . "</a> -\n";
        echo "<a href='" . FUSION_SELF . $aidlink . "&amp;action=delete&amp;faq_cat_id=" . $data['faq_cat_id'] . "&amp;t=cat' onclick=\"return confirm('" . $locale['546'] . "');\">" . $locale['543'] . "</a></td>\n";
        echo "</tr>\n";
        $result2 = dbquery("SELECT faq_id, faq_question, faq_answer FROM " . DB_FAQS . " WHERE faq_cat_id='" . $data['faq_cat_id'] . "' ORDER BY faq_id");
        if (dbrows($result2) != 0) {
            echo "<tr>\n<td colspan='2'>\n";
            echo "<div class='panel panel-default' id='box_" . $data['faq_cat_id'] . "'" . $div . ">\n";
            echo "<div class='panel-body'>\n";
            echo "<table cellpadding='0' cellspacing='0' class='table table-responsive' width='100%'>\n";
            while ($data2 = dbarray($result2)) {
                echo "<tr>\n";
                echo "<td class='tbl'><strong>" . $data2['faq_question'] . "</strong></td>\n";
                echo "<td align='right' class='tbl'><a href='" . FUSION_SELF . $aidlink . "&amp;action=edit&amp;faq_cat_id=" . $data['faq_cat_id'] . "&amp;faq_id=" . $data2['faq_id'] . "&amp;t=faq'>" . $locale['542'] . "</a> -\n";
                echo "<a href='" . FUSION_SELF . $aidlink . "&amp;action=delete&amp;faq_cat_id=" . $data['faq_cat_id'] . "&amp;faq_id=" . $data2['faq_id'] . "&amp;t=faq' onclick=\"return confirm('" . $locale['547'] . "');\">" . $locale['543'] . "</a></td>\n";
                echo "</tr>\n<tr>\n";
                echo "<td colspan='2' class='tbl'>" . trim_text($data2['faq_answer'], 60) . "</td>\n";
                echo "</tr>\n";
            }
            echo "</tbody>\n</table>\n</div>\n</div>\n</td>\n</tr>\n";
        } else {
            echo "<tr>\n<td colspan='2'>\n";
            echo "<div id='box_" . $data['faq_cat_id'] . "' style='display:none'>\n";
            echo "<table cellpadding='0' cellspacing='0' width='100%'>\n";
            echo "<tr>\n<td class='tbl'>" . $locale['544'] . "</td>\n</tr>\n";
            echo "</table>\n</div>\n</td>\n</tr>\n";
        }
    }
    echo "</table>\n";
} else {
    echo "<div style='text-align:center'>" . $locale['545'] . "<br />\n</div>\n";
}
Example #18
0
            						<h3><span><?php 
_e('Top Search Terms', 'wp-power-stats');
?>
</span></h3>
            						<div class="inside">
                                        <table>
                                            <tbody>
                								<?php 
$i = 1;
foreach ($top_searches as $search) {
    ?>
                								<tr><td class="order"><?php 
    echo $i;
    ?>
.</td><td class="link"><?php 
    echo trim_text($search['terms'], 45);
    ?>
</td></tr>
                								<?php 
    $i++;
}
?>
                                            </tbody>
                                        </table>
            						</div><!-- inside -->
                				</div><!-- postbox -->
                            </div><!-- postbox-container -->
                        </div><!-- cell -->
                    </div><!-- half -->
        			
                </div><!-- cell -->
Example #19
0
 /**
  * News Item Container
  * @param      $info
  * @param bool $list_view
  */
 function render_news($subject, $news, $info, $list_view = FALSE)
 {
     global $locale, $settings, $news_settings, $aidlink;
     $parameter = $settings['siteurl'] . "infusions/news/news.php?readmore=" . $info['news_id'];
     $title = $settings['sitename'] . $locale['global_200'] . $locale['news_0004'] . $locale['global_201'] . $info['news_subject'] . "" . $locale['global_200'];
     if ($list_view) {
         echo "<article class='panel panel-default clearfix' style='height:300px;'>\n";
         echo $info['news_sticky'] ? "<i class='pull-right entypo ialert icon-sm'></i>\n" : '';
         if ($info['news_image']) {
             echo "<div class='pull-left' style='display:inline-block; height: 100%; width:300px;'>\n";
             echo $info['news_image'];
             echo "</div>\n";
             echo "<div class='overflow-hide' style='padding:25px;'>\n";
         }
         echo "<h4 class='news-title panel-title'><a class='strong text-dark' href='" . INFUSIONS . "news/news.php?readmore=" . $info['news_id'] . "' >" . $info['news_subject'] . "</a></h4>\n";
         echo "<div class='m-t-10'>\n";
         echo "<span class='news-text m-t-10'>" . $info['news_news'] . "</span>\n";
         echo "<div class='m-t-10'><span class='news-date'>" . showdate($settings['newsdate'], $info['news_date']) . " -- </span></div>\n";
         echo "<div class='news-category m-t-10'><span class='text-dark strong'>\n" . ucwords($locale['in']) . "</span> : ";
         echo $info['cat_name'] ? "<a href='" . INFUSIONS . "news/news.php?cat_id=" . $info['cat_id'] . "'>" . $info['cat_name'] . "</a>" : "<a href='" . INFUSIONS . "news/news.php?cat_id=0'>" . $locale['news_0006'] . "</a>&nbsp;";
         echo "</div>\n";
         if ($info['news_image']) {
             echo "</div>\n";
         }
         echo "<div class='news-footer " . ($info['news_image'] ? "m-t-20" : '') . " p-15 p-l-0'>\n";
         echo "<span><i class='entypo eye'></i> " . number_format($info['news_reads']) . "</span>";
         echo $info['news_allow_comments'] ? display_comments($info['news_comments'], INFUSIONS . "news/news.php?readmore=" . $info['news_id'] . "#comments") : '';
         echo $info['news_allow_ratings'] ? display_ratings($info['news_sum_rating'], $info['news_count_votes'], INFUSIONS . "news/news.php?readmore=" . $info['news_id'] . "#postrating") : '';
         echo "<a class='m-r-10' title='" . $locale['news_0002'] . "' href='" . $info['print_link'] . "'><i class='entypo print'></i></a>";
         if (!empty($info['admin_actions'])) {
             $admin_actions = $info['admin_actions'];
             echo "<a title='" . $locale['news_0003'] . "' href='" . $admin_actions['edit'] . "' title='" . $locale['news_0003'] . "' />" . $locale['news_0003'] . "</a>\n";
         }
         echo "</div>\n";
         echo "</article>\n";
     } else {
         echo "<!--news_prepost_" . $info['news_id'] . "-->\n";
         echo "<article class='panel panel-default' style='min-height:290px'>\n";
         echo "<div class='overflow-hide news-img-header' style='height: " . $news_settings['news_thumb_h'] . "px'>\n";
         add_to_jquery("\n\t\t\t\$('.news-img-header').hover(\n\t\t\t\tfunction() { \$(this).closest('.panel').find('.news-snippet').css({'opacity': 1, 'height': " . $news_settings['news_thumb_h'] . " }); },\n\t\t\t\tfunction() { \$(this).closest('.panel').find('.news-snippet').css({'opacity': 0}); }\n\t\t\t);\n\t\t\t");
         echo $info['news_image'];
         echo "<a class='opacity-none transition news-snippet'\n\t\t\thref='" . ($news_settings['news_image_link'] == 0 ? INFUSIONS . "news/news.php?cat_id=" . $info['cat_id'] : INFUSIONS . "news/news.php?readmore=" . $info['news_id']) . "'>\n\t\t\t" . trim_text(strip_tags($info['news_news']), 120) . "</a>\n";
         echo "</div>\n";
         echo "<div class='panel-body' " . (empty($info['news_image']) ? "style='min-height:221px;'" : "style='min-height:133px;'") . " >\n";
         echo $info['news_sticky'] ? "<i class='pull-right entypo ialert icon-sm'></i>\n" : '';
         echo "<h4 class='news-title panel-title'><a class='strong text-dark' href='" . INFUSIONS . "news/news.php?readmore=" . $info['news_id'] . "' >" . $info['news_subject'] . "</a></h4>\n";
         echo "<div class='news-text m-t-5' style='height:200px;'>" . trim_text(strip_tags($info['news_news']), 250) . "</div>\n";
         echo "<div class='news-date m-t-5'>" . showdate("newsdate", $info['news_date']) . "</div>\n";
         echo "<div class='news-category m-t-5'><span class='text-dark strong'>\n" . ucwords($locale['in']) . "</span> : ";
         echo $info['cat_name'] ? "<a href='" . INFUSIONS . "news/news.php?cat_id=" . $info['cat_id'] . "'>" . $info['cat_name'] . "</a>" : "<a href='" . INFUSIONS . "news/news.php?cat_id=0&amp;filter=false'>" . $locale['news_0006'] . "</a>&nbsp;";
         echo "</div>\n";
         echo "</div>\n";
         echo "<div class='news-footer panel-footer'>\n";
         echo "<span class='m-r-10'><i class='entypo eye'></i> " . number_format($info['news_reads']) . "</span>";
         echo $info['news_allow_comments'] ? display_comments($info['news_comments'], INFUSIONS . "news/news.php?readmore=" . $info['news_id'] . "#comments", '', 2) : '';
         echo $info['news_allow_ratings'] ? "" . display_ratings($info['news_sum_rating'], $info['news_count_votes'], INFUSIONS . "news/news.php?readmore=" . $info['news_id'] . "#postrating", '', 2) . "" : '';
         echo "<a title='" . $locale['news_0002'] . "' href='" . $info['print_link'] . "'><i class='entypo print'></i></a>";
         if (!empty($info['admin_actions'])) {
             $admin_actions = $info['admin_actions'];
             echo "<a class='pull-right' title='" . $locale['news_0003'] . "' href='" . $admin_actions['edit'] . "' title='" . $locale['news_0003'] . "' /><i class='entypo pencil'></i></a>\n";
         }
         echo "</div>\n";
         echo "</article>\n";
     }
 }
Example #20
0
			$mod_tags[$tags[$tag]['tagcat_name']][] = &$tags[$tag]; // Maybe the index could be changed from tagcat_id to tagcat_name as the latter is more often used
		}
		
		// Sort the array containing the article tags in order to list them always in the same order
		ksort($mod_tags);
		
		// Display the most recent version the MOD is compatible with
		usort($mod_tags['phpbb'], 'version_compare_tag');
		
		$version_tag = array_pop($mod_tags['phpbb']);

		// Assign some general variables about the article
		$template->assign_block_vars('modrow', array(
			'MOD_TITLE'				=> $row['mod_hu_title'],
			'MOD_VERSION'			=> $row['mod_version'],
			'MOD_DESC'				=> trim_text($row['mod_desc'], 120),
			'MOD_ID'				=> $row['mod_id'],
			'U_MOD'					=> append_sid($phpbb_root_path . 'mods.' . $phpEx, 'mode=mod&amp;id=' . $row['mod_id']),
			'MOD_POSTER'			=> get_username_string('username', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
			'MOD_POSTER_COLOUR'		=> get_username_string('colour', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
			'MOD_POSTER_FULL'		=> get_username_string('full', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
			'MOD_POSTED'			=> $user->format_date($row['topic_time']),	
			'MOD_VIEWS'				=> $row['topic_views'],	
			'MOD_APPROVED'			=> $row['topic_approved'],
			'MOD_AUTHOR'			=> $row['mod_author_name'],
			'U_MOD_AUTHOR'			=> 'http://www.phpbb.com/community/memberlist.php?mode=viewprofile&ampu=' . $row['mod_author_id'],
			'MOD_AUTHOR_FULL'		=> '<a href="http://www.phpbb.com/community/memberlist.php?mode=viewprofile&amp;u=' . $row['mod_author_id'] . '">' . $row['mod_author_name'] . '</a>',
			'MOD_PHPBB_VERSION'		=> $version_tag['tag_title'],
		
			'U_MCP_QUEUE'		=> ($auth->acl_get('m_approve', MODS_FORUM_ID)) ? append_sid("{$phpbb_root_path}mcp.$phpEx", "i=queue&amp;mode=approve_details&amp;t={$row['topic_id']}", true) : false,
			'UNAPPROVED_IMG'	=> $user->img('icon_topic_unapproved', 'TOPIC_UNAPPROVED'),
        <th>resolution</th>
        <th>viewport</th>
        <th>tracking frequency</th>
      </tr>
  </thead>
  <tbody>
  <?php 
$list = '<tr class="odd">' . PHP_EOL;
// log data
$list .= '<td>' . PHP_EOL;
if ($log['url']) {
    $list .= '<a href="' . $log['url'] . '" rel="external" title="' . $log['title'] . '">' . trim_text($log['title']) . '</a>';
}
$list .= '</td>' . PHP_EOL;
$list .= '<td>' . PHP_EOL;
$list .= '<a href="' . CACHE_DIR . $log['file'] . '" rel="external">' . trim_text($log['file']) . '</a>' . PHP_EOL;
$list .= '</td>' . PHP_EOL;
$list .= '<td>' . PHP_EOL;
$list .= '<acronym title="' . $log['user_agent'] . '">' . $log['browser'] . ' ' . $log['browser_ver'] . '</acronym> on ' . $log['os'] . PHP_EOL;
$list .= '</td>' . PHP_EOL;
$list .= '<td>' . PHP_EOL;
$list .= $log['scr_width'] . ' x ' . $log['scr_height'] . PHP_EOL;
$list .= '</td>' . PHP_EOL;
$list .= '<td>' . PHP_EOL;
$list .= $log['vp_width'] . ' x ' . $log['vp_height'] . PHP_EOL;
$list .= '</td>' . PHP_EOL;
$list .= '<td>' . PHP_EOL;
$list .= $log['fps'] . ' fps' . PHP_EOL;
$list .= '</td>' . PHP_EOL;
$list .= '</tr>' . PHP_EOL;
echo $list;
Example #22
0
            } else {
                $pagination .= "<span class=\"disabled\">next <img src=\"./img/rgt.png\"></span>";
                $pagination .= "</div>\n";
            }
        }
        while ($row = mysql_fetch_array($result)) {
            if ($evenOdd) {
                $odder = " bcelleven";
                $splitter = false;
            } else {
                $odder = " bcellodd";
                $splitter = true;
            }
            $evenOdd = !$evenOdd;
            $get_latest_post = good_query_assoc("SELECT a_datetime FROM forum_posts WHERE question_id=" . $row['id'] . " ORDER BY a_datetime DESC LIMIT 1");
            $wrt .= '<tr><td class="left' . $odder . $fd_color . '" width="30%"><a class="ld" href="' . $module_public . '&mode=view' . $urlsel . '&pid=' . $row['pid'] . '&id=' . $row['id'] . '">' . $row['topic'] . '</a> by ' . $row['name'] . '</td><td class="left' . $odder . $fd_color . '" width="20%">' . trim_text($row['detail'], 20) . '</td><td class="left' . $odder . $fd_color . '">' . $row['name'] . '</td><td class="right' . $odder . $fd_color . '">' . substr($get_latest_post['a_datetime'], 0, 16) . '</td></tr>';
        }
        // PAGINATION END
        $wrt .= '</table></td></tr>';
    }
    $wrt .= '';
    $wrt .= '';
    $wrt .= '';
    $wrt .= '</table>';
}
echo $wrt;
if (isset($pagination)) {
    echo $pagination;
}
//echo $pagination;
$wrt = null;
/**
* trims the length of the text of a blog or reply
*
* @param int|bool $blog_id the blog_id for the blog we will trim the text length for (if not triming the blog text length, set to false)
* @param int|bool $reply_id same as blog_id, except for replies
* @param int str_limit the string length limit
* @param bool $always_return If it is false this function returns false if the string is not shortened, if true it always returns the text whether it was shortened or not
*
* @return Returns false if $always_return is false and the text is not trimmed, otherwise it returns the string (shortened if it was)
*/
function trim_text_length($blog_id, $reply_id, $str_limit, $always_return = false)
{
    global $phpbb_root_path, $phpEx, $user;
    $bbcode_bitfield = $text_only_message = $text = '';
    if ($blog_id !== false) {
        $data = blog_data::$blog[$blog_id];
        $text = $data['blog_text'];
    } else {
        if ($reply_id === false) {
            return false;
        }
        $data = blog_data::$reply[$reply_id];
        $blog_id = $data['blog_id'];
        $text = $data['reply_text'];
    }
    if (utf8_strlen($text) > $str_limit) {
        $text = trim_text($text, $data['bbcode_uid'], $str_limit, $data['bbcode_uid']);
        $text .= "\n \n <a href=\"";
        if ($reply_id !== false) {
            $text .= blog_url(isset(blog_data::$blog[$blog_id]) ? blog_data::$blog[$blog_id]['user_id'] : false, $blog_id, $reply_id);
        } else {
            $text .= blog_url(blog_data::$blog[$blog_id]['user_id'], $blog_id);
        }
        $text .= '">[ ' . $user->lang['CONTINUED'] . ' ]</a>';
        return $text;
    } else {
        if ($always_return) {
            return $text;
        } else {
            return false;
        }
    }
}
Example #24
0
                </div><!--end .row -->

                <div class="col-md-6">
                    <?php
                    foreach($right as $row){
                        ?>
                        <div class="media">
                            <div class="col-md-3">
                                <img  alt="Bootstrap Media Preview" src="<?=base_url()?>uploads/blogs/<?=$row['cover_image']?>" class="media-object img-responsive" />
                            </div>
                            <div class="col-md-9">
                                <div class="media-body">
                                    <h4 class="media-heading">
                                        <?=$row['title']?>
                                    </h4>
                                    <?=trim_text(html_entity_decode($row['content']),150)?>

                                </div>
                            </div>


                        </div>
                    <?php
                    }
                    ?>

                </div><!--end .row -->

            </div><!--end .card-body -->
        </div><!--end .card -->
Example #25
0
    /**
     * News Item Container
     * @param      $info
     */
    function render_news($subject, $news, $info)
    {
        global $aidlink;
        $locale = fusion_get_locale();
        $news_settings = \PHPFusion\News\NewsServer::get_news_settings();
        add_to_jquery("\n\t\t\t\$('.news-img-header').hover(\n\t\t\t\tfunction() { \$(this).closest('.news-article').find('.news-snippet').css({'opacity': 1, 'height': " . $news_settings['news_thumb_h'] . " }); },\n\t\t\t\tfunction() { \$(this).closest('.news-article').find('.news-snippet').css({'opacity': 0}); }\n\t\t\t);\n\t\t\t");
        ?>
        <!--news_prepost_<?php 
        echo $info['news_id'];
        ?>
-->
        <article class="news-article">
            <div class="news-img-info" style="height: <?php 
        echo $news_settings['news_thumb_h'];
        ?>
px">
                <?php 
        echo $info['news_image'];
        ?>
                <div class="news-box-overlay">
                    <a title="<?php 
        echo $info['news_subject'];
        ?>
" href="<?php 
        echo $info['news_image_url'];
        ?>
" rel="bookmark">
                        <h4><?php 
        echo $info['news_subject'];
        ?>
</h4>
                        <?php 
        echo trim_text(strip_tags($info['news_news']), 120);
        ?>
                    </a>
                </div>
            </div>

            <h4 class="news-title-info">
                <a class="strong text-dark" href="<?php 
        echo $info['news_url'];
        ?>
">
                    <?php 
        $info['news_sticky'] ? "<i class='pull-right fa fa-warning icon-sm'></i>\n" : '';
        ?>
                    <?php 
        echo $info['news_subject'];
        ?>
                </a>
            </h4>
            <div class="news-poster-info">
                <div class="pull-left">
                    <?php 
        echo display_avatar($info, '30px', '', false, 'img-circle');
        ?>
                </div>
                <div class="overflow-hide">
                    <span class="news-author">
                        <?php 
        echo profile_link($info['user_id'], $info['user_name'], $info['user_status'], "text-lighter");
        ?>
                    </span>
                    <span class="news-date m-r-10">
                        <i class="fa fa-calendar fa-fw"></i> <?php 
        echo showdate("newsdate", $info['news_date']);
        ?>
                    </span>
                    <?php 
        if ($info['news_display_comments']) {
            ?>
                        <span class="news-comments"><i class="fa fa-comment-o"></i> <?php 
            echo $info['news_display_comments'];
            ?>
</span>
                    <?php 
        }
        ?>
                    <?php 
        if ($info['news_display_ratings']) {
            ?>
                        <span class="news-ratings"><i class="fa fa-star-o fa-fw"></i> <?php 
            echo $info['news_display_ratings'];
            ?>
</span>
                    <?php 
        }
        ?>
                    <span class="news-read">
                        <i class="fa fa-eye fa-fw"></i> <?php 
        echo number_format($info['news_reads']);
        ?>
                    </span>
                </div>
            </div>

            <div class="news-description-info">
                <?php 
        echo ucwords($locale['in']);
        ?>
                <?php 
        echo $info['news_cat_name'] ? "<a href='" . INFUSIONS . "news/news.php?cat_id=" . $info['news_cat_id'] . "'>" . $info['news_cat_name'] . "</a>" : "<a href='" . INFUSIONS . "news/news.php?cat_id=0&amp;filter=false'>" . $locale['news_0006'] . "</a>&nbsp;";
        ?>
                <br/>
                <?php 
        echo trim_text(strip_tags($info['news_news']), 250);
        ?>
            </div>

        </article>
        <!--//news_prepost_<?php 
        echo $info['news_id'];
        ?>
-->
        <?php 
    }
        echo $question->answerCount->count_answer;
        ?>
                </div>
                <div class = 'question-thumb-title'>
                    <a href='<?php 
        echo $this->url->create("forum/view/{$question->id}");
        ?>
'> <h3><?php 
        echo $question->title;
        ?>
 </h3> </a>
                    <a href='<?php 
        echo $this->url->create("forum/view/{$question->id}");
        ?>
'><?php 
        echo trim_text($question->content, 149);
        ?>
</a>
                </div>
                <div class="author smaller right">
                    <?php 
        echo $this->users->fetchGravatar($question->user_id);
        ?>
                    <a href='<?php 
        echo $this->url->create("users/id/{$question->user_id}");
        ?>
'>
                        <?php 
        echo $this->users->fetchName($question->user_id);
        ?>
                    </a>    
Example #27
0
function select_cache()
{
    $s = '<label for="cache">Page</label> ';
    $s .= '<select id="cache" name="cache_id" class="mr">';
    $s .= '<option value="">---</option>';
    $rows = db_select_all(TBL_PREFIX . TBL_CACHE, "id, title", "1 ORDER BY id DESC");
    // pad with zeros the page id
    $num = db_select(TBL_PREFIX . TBL_CACHE, "MAX(id) as max", 1);
    $n = strlen($num['max']);
    foreach ($rows as $row) {
        $select = isset($_SESSION['cache_id']) && $row['id'] == $_SESSION['cache_id'] ? 'selected="selected"' : null;
        $s .= '<option ' . $select . ' value="' . $row['id'] . '">' . pad_number($row['id'], $n) . ': ' . trim_text($row['title']) . '</option>';
    }
    $s .= '</select>';
    return $s;
}
Example #28
0
  </thead>
  
  <?php 
    // build query
    $sql = "id ='" . array_shift($diff) . "'";
    if (count($diff) > 0) {
        foreach ($diff as $value) {
            $sql .= " OR id='" . $value . "'";
        }
    }
    // select orphan logs
    $cache = db_select_all(TBL_PREFIX . TBL_CACHE, "*", $sql);
    $rows = "";
    foreach ($cache as $log) {
        $rows .= '<tr>' . PHP_EOL;
        $rows .= '<td class="pl pr"><a href="' . $log['url'] . '" rel="external" title="' . $log['title'] . '">' . trim_text($log['title']) . '</a></td>' . PHP_EOL;
        $rows .= '<td class="pl pr">' . $log['saved'] . '</td>' . PHP_EOL;
        if ($ROOT) {
            $rows .= '<td class="pl pr"><a class="del" href="delete.php?pid=' . $log['id'] . '">delete</a></td>' . PHP_EOL;
        }
        $rows .= '</tr>' . PHP_EOL;
    }
    ?>

  <tbody>
  <?php 
    echo $rows;
    ?>
  </tbody>
  </table>
  
Example #29
0
    function display_forum_tags($info)
    {
        $locale = fusion_get_locale();
        echo render_breadcrumbs();
        if (isset($_GET['tag_id'])) {
            // thread design
            echo "<!--pre_forum-->\n";
            echo "<div class='forum-title m-t-20'>" . $locale['forum_0341'] . "</div>\n";
            echo "<div class='filter'>\n";
            forum_filter($info);
            echo "</div>\n";
            if (!empty($info['threads']['pagenav'])) {
                echo "<div class='text-right'>\n";
                echo $info['threads']['pagenav'];
                echo "</div>\n";
            }
            if (!empty($info['threads'])) {
                echo "<div class='forum-container list-group-item'>\n";
                if (!empty($info['threads']['sticky'])) {
                    foreach ($info['threads']['sticky'] as $cdata) {
                        render_thread_item($cdata);
                    }
                }
                if (!empty($info['threads']['item'])) {
                    foreach ($info['threads']['item'] as $cdata) {
                        render_thread_item($cdata);
                    }
                }
                echo "</div>\n";
            } else {
                echo "<div class='text-center'>" . $locale['forum_0269'] . "</div>\n";
            }
            if (!empty($info['threads']['pagenav'])) {
                echo "<div class='text-right hidden-xs m-t-15'>\n";
                echo $info['threads']['pagenav'];
                echo "</div>\n";
            }
            if (!empty($info['threads']['pagenav2'])) {
                echo "<div class='hidden-sm hidden-md hidden-lg m-t-15'>\n";
                echo $info['threads']['pagenav2'];
                echo "</div>\n";
            }
        } else {
            ?>
            <div class="row m-0">
                <?php 
            if (!empty($info['tags'])) {
                ?>
                    <?php 
                unset($info['tags'][0]);
                ?>
                    <?php 
                foreach ($info['tags'] as $tag_id => $tag_data) {
                    ?>
                        <div class="col-xs-12 col-sm-4" style="height: 200px; max-height:200px; background-color: <?php 
                    echo $tag_data['tag_color'];
                    ?>
">
                            <a href="<?php 
                    echo $tag_data['tag_link'];
                    ?>
">
                                <div class="panel-body">
                                    <h4 class="text-white"><?php 
                    echo $tag_data['tag_title'];
                    ?>
</h4>
                                    <p class="text-white"><?php 
                    echo $tag_data['tag_description'];
                    ?>
</p>
                                </div>
                                <hr/>
                                <?php 
                    if (!empty($tag_data['threads'])) {
                        ?>
                                <span class="tag_result text-white">
                                    <?php 
                        echo trim_text($tag_data['threads']['thread_subject'], 10) . " - " . timer($tag_data['threads']['thread_lastpost']);
                        ?>
                                </span>
                                <?php 
                    }
                    ?>
                            </a>
                        </div>
                    <?php 
                }
                ?>
                <?php 
            }
            ?>
            </div>
            <?php 
        }
    }
Example #30
0
<?php
if(count($all_mails)){
    ?>
    <div class="card col-md-5">
        <div class="card-body height-12 scroll style-default-bright">
            <div class="list-group list-email list-gray">
                <?php
                $i=0;
                foreach($all_mails as $mail){
                    $i++;
                    if($i>1){
                        ?>
                        <a href="<?=base_url().$this->uri->segment(1).'/'.$this->uri->segment(2)?>/view_mail/<?=encryptValue($mail['id'])?>" class="list-group-item">
                            <h5><?=$mail['from']?></h5>

                            <p class="hidden-xs hidden-sm"><?=trim_text($mail['content'],100)?></p>
                            <div style="margin: -10px;" class="stick-top-right small-padding text-default-light text-sm"><?=custom_date_format('d / F / Y',$mail['dateadded'])?></div>

                        </a>
                    <?php
                    }

                }
                ?>


            </div><!--end .list-group -->

        </div>