예제 #1
0
 public function delimage(Request $request)
 {
     $id = (array) $request->id;
     $images = Image::whereIn('id', $id)->get(['url']);
     if ($images) {
         foreach ($images as $image) {
             @unlink(public_path() . $image['url']);
             @unlink(public_path() . getThumb($image['url'], 'xs'));
             @unlink(public_path() . getThumb($image['url'], 'small'));
             @unlink(public_path() . getThumb($image['url'], 'big'));
         }
         Image::whereIn('id', $id)->delete();
         return response()->json(200);
     } else {
         return response()->json(404);
     }
 }
 public function getPhotosById($uid, $ids, $setSize = 0)
 {
     if (!$ids) {
         return array();
     }
     $rs = array();
     if ($ids) {
         $rs = $this->field('id,title,url,real_size,has_thumb,status')->where('id IN(' . $ids . ') AND uid=' . $uid)->findAll(false);
         if ($rs) {
             //                $size = $this->getTotal() == 1 ? 150 : 150;
             $size = C('upload', 'thumb_size');
             $idList = array();
             foreach ($rs as $key => $val) {
                 if ($val['status'] == 1) {
                     $rs[$key]['thumb'] = getThumb($val['url'], $setSize, false);
                     //                    $rs[$key]['real_size'] = changeFileSize($val['real_size']);
                     //                    $rs[$key]['size'] = $size[$setSize];
                     if (!$val['has_thumb']) {
                         $rs[$key]['has_thumb'] = 1;
                         $idList[] = $val['id'];
                     }
                 } else {
                     $rs[$key]['status'] = 0;
                 }
             }
             if ($idList) {
                 $this->setPhotoHasThumb($idList);
             }
         }
     }
     return $rs;
 }
예제 #3
0
    foreach ($posttags as $tag) {
        echo '<a href="' . get_tag_link($tag->term_id) . '" class="tags border-color">' . $tag->name . '</a>';
    }
}
?>
                        </span>
					  </div>
                   </div>
		
                    <div class="sharingbottom"> 
                    	<div class="resdontshow shr"><strong><?php 
_e('SHARE : ', 'dronetv');
?>
</strong></div>
						<?php 
$pimg = getThumb('large');
$ptitle = get_the_title();
$permalink = get_permalink();
echo showshareingpost($permalink, $pimg[0], $ptitle, false);
?>
                    </div>
                    
                    <br class="clear" />
                    
					<?php 
if (comments_open()) {
    comments_template();
}
?>
                       
    </div>
예제 #4
0
    echo '<p class="titulo"><a href="' . BASE . '/artigo/' . $bl['url'] . '" title="ver mais de ' . $bl['titulo'] . '">' . $bl['titulo'] . '</a></p>';
    echo '</li>';
}
?>
            </ul>
        </div><!-- /tec -->
    </div><!-- /bloco games + tecnologia -->
    
    <div class="internet">
    	<h2>internet</h2>
        <ul class="inter">
        	<?php 
$readBloco = read('up_posts', "WHERE tipo = 'post' AND status = '1' AND cat_pai = '7' ORDER BY data DESC LIMIT 1,4");
foreach ($readBloco as $bl) {
    $n++;
    echo '<li class="bsshadow radius';
    if ($n == 3) {
        echo ' last';
    }
    echo '">';
    getThumb($bl['thumb'], $bl['tags'], $bl['titulo'], '200', '150', '', '', BASE . '/artigo/' . $bl['url']);
    echo '<p class="data">' . date('d/m/Y H:i', strtotime($bl['data'])) . '</p>';
    echo '<p class="titulo">' . $bl['titulo'] . '</p>';
    echo '</li>';
}
?>
        </ul>
    </div>
    
</div><!-- /home -->
</div><!-- //content -->
/**
 * Function to render the result as full HTML intro
 * @param object $ce content element object
 * @param object $row Content Item row
 * @param string $searchword searched word to be highlighted
 * @param object $params Component parameters
 * @return HTML HTML string with Article title rendered
 */
function showFullIntro($ce, $row, $searchword, $params)
{
    $allowed_tags = $params->get('allowed_tags');
    $debug = $params->get('debug');
    $img = "";
    $img_div = "";
    echo "<div class=\"cp_text\">\n";
    if ($params->get('image_thumbnail') == 1 && $ce->images) {
        $thumb_width = $params->get('thumb_width');
        $thumb_height = $params->get('thumb_height');
        $aspect = $params->get('keep_aspect');
        $quality = $params->get('image_quality');
        $row =& stripImages($row, $ce->images_dir);
        if (!empty($row->images)) {
            $title = htmlspecialchars($row->title);
            $image = strtok($row->images, "|\r\n");
            $extra = "alt=\"{$title}\" title=\"{$title}\" class=\"cp_image\"";
            $img_div = "";
            if ($img = getThumb($image, $ce->images_dir, $thumb_width, $thumb_height, $extra, $aspect, $quality, null, $debug)) {
                $img_div = "<div class=\"cp_image\" style=\"width : " . $thumb_width . "px; height : " . $thumb_height . "px;\">";
                $img_div .= "<a href=\"" . $row->href . "\" alt=\"{$title}\">";
                $img_div .= $img;
                $img_div .= "</a>";
                $img_div .= "</div>\n";
            }
        }
    }
    $text = strip_tags($row->introtext, $allowed_tags);
    /* highlight searchword */
    if ($searchword != "") {
        $text = preg_replace('/(' . $searchword . ')/i', '<span class="highlight">\\0</span>', $text);
    }
    echo $img_div . $text;
    echo "</div>\n";
}
예제 #6
0
파일: artigo.php 프로젝트: CivalCs/ProPHP
    <div class="content">
      <?php 
echo $art['content'];
?>
        <?php 
$readArtGb = read('up_posts_gb', "WHERE post_id = '{$art['id']}'");
if ($readArtGb) {
    echo '<ul class="gallery">';
    foreach ($readArtGb as $gb) {
        $gbnum++;
        echo '<li';
        if ($gbnum % 5 == 0) {
            echo ' class="last" ';
        }
        echo '>';
        getThumb($gb['img'], $art['titulo'] . '( imagem' . $gbnum . ')', $art['titulo'], '100', '65', $art['id'], '', '', '#');
        echo '</li>';
    }
    echo '</ul><!-- //gallery -->';
}
?>
        <div class="metadata">
            <?php 
$autor = getAutor($art['autor']);
$avatar = $autor['avatar'] != '' ? BASE . '/tim.php?src=' . BASE . '/uploads/avatars' . $autor['avatar'] . '&w=50&h=50&zc=1&q=100&a=t' : $autor['foto'];
?>
        	<img src="<?php 
echo $avatar;
?>
" width="50" height="50" title="<?php 
echo $autor['nome'];
예제 #7
0
파일: index.php 프로젝트: sparsis/vizam
</a></li>
   </ul>
    <div class="tab-content">
    	<div class="tab-pane active" id="tab1">
        <?php 
        echo '<p><a title="' . $cat['nome'] . ' | ' . SITENAME . '" href="' . BASE . '/produtos/' . $cat['url'] . '">' . $cat['nome'] . '</a></p>';
        ?>
       
   <!-- AQUI TERÁ UM LOOP DE PRODUTOS --->         
            <ul class="thumbnails">
          <?php 
        $postList = read('posts', "WHERE cat_id = '{$ex['cat_id']}' AND status = '1' ORDER BY visitas LIMIT 3");
        foreach ($postList as $list) {
            echo '<li class="span4">';
            echo '<div class="thumbnail">';
            getThumb($list['thumb'], $list['titulo'], $list['titulo'], '250', '200', '', '', '#', 'r', BASE . '/uploads/' . $list['thumb'], '');
            echo '<h3>' . lmWord($list['titulo'], 50) . '</h3>';
            echo '<p>' . lmWord($list['content'], 50) . '</p>';
            echo '<a title="Ver mais de ' . $list['titulo'] . '" href="' . BASE . '/produto/' . $list['url'] . '" class="btn btn-large btn-block btn-primary">saiba mais ... </a>';
            echo '</div>';
            echo '</li>';
        }
        echo '</ul>';
        echo '</div>';
    }
}
?>
            <!-- ONDE SE ENCERRA O LOOP -->
</section>
  <?php 
setArq('tpl/footer');
예제 #8
0
" class="tribble-hover">
          <span class="title"><?php 
    echo $tribble->title;
    ?>
</span>
          <span class="desc"><?php 
    echo $tribble->text;
    ?>
</span>
          <em><?php 
    echo strftime('%B %d, %Y', mysql_to_unix($tribble->ts));
    ?>
</em>              
        </a>
        <img src="<?php 
    echo getThumb($tribble->image);
    ?>
" width="200" height="150" alt="<?php 
    echo $tribble->title;
    ?>
" />
      </div>
      <div class="tribble-tools">
        views: <?php 
    echo $tribble->views;
    ?>
        
      </div>
      <h5><?php 
    echo $tribble->user;
    ?>
예제 #9
0
파일: produtos.php 프로젝트: sparsis/vizam
    <?php 
echo '<ul class="thumbnails">';
$pag = empty($url[3]) ? '1' : $url[3];
$maximo = 8;
$inicio = $pag * $maximo - $maximo;
if ($cat['id_pai'] != '') {
    $readProdutos = read('posts', "WHERE cat_id = '{$cat['id']}' AND tipo = 'post' AND status = '1' ORDER BY data DESC LIMIT {$inicio}, {$maximo}");
} else {
    $readProdutos = read('posts', "WHERE cat_pai = '{$cat['id']}' AND tipo = 'post' AND status = '1' ORDER BY data DESC LIMIT {$inicio}, {$maximo}");
}
foreach ($readProdutos as $art) {
    echo '<li';
    echo ' class="span4" ';
    echo '>';
    echo '<div class="thumbnail">';
    getThumb($art['thumb'], $cat['nome'] . '--' . $art['titulo'], $art['titulo'], '250', '200', '', '', '#', 'r');
    echo '<h3>' . lmWord($art['titulo'], 50) . '</h3>';
    echo '<p>' . lmWord($art['content'], 50) . '</p>';
    echo '<a title="Ver mais de ' . $art['titulo'] . '" href="' . BASE . '/produto/' . $art['url'] . '" class="btn btn-large btn-block btn-primary">saiba mais ... </a>';
    echo '</div>';
    echo '</li>';
}
echo '</ul>';
echo '</div>';
echo '</div>';
echo '</section>';
$link = BASE . '/categoria/' . $cat['url'] . '/page/';
if ($cat['id_pai'] != '') {
    readPaginator('posts', " WHERE cat_id = '{$cat['id']}' AND tipo = 'post' AND status = '1' ORDER BY data DESC", $maximo, $link, $pag, '870px');
} else {
    readPaginator('posts', " WHERE cat_pai = '{$cat['id']}' AND tipo = 'post' AND status = '1' ORDER BY data DESC", $maximo, $link, $pag, '870px');
예제 #10
0
파일: slideshow.php 프로젝트: qwazix/viood
        if ($goToImage == $item) {
            $goToImageIndex = $counter;
        }
        ?>
 
                <div>
                   <img class="picture" src="<?php 
        echo $goToImage == $item || $goToImage == $previousItem ? getSlide($path . "/" . $item) : getThumb($path . "/" . $item);
        ?>
" 
                                        data-src="<?php 
        echo getSlide($path . "/" . $item);
        ?>
"
                                        data-thumb="<?php 
        echo getThumb($path . "/" . $item);
        ?>
"
                                        data-fullimage="<?php 
        echo $base_url . "imageviewer/" . $path . "/" . $item;
        ?>
" 
                                        data-imagename="<?php 
        echo $item;
        ?>
"/> 
                </div>
                <?php 
        $counter++;
        $previousItem = $item;
    }
예제 #11
0
파일: categoria.php 프로젝트: sparsis/vizam
    $readSlidea = read('carroussel', "WHERE cat_id = '{$cat['id']}' ORDER BY data DESC");
    foreach ($readSlidea as $slide) {
    }
    echo '<section class="carousel slide" id="carrossel"> <!--section carrossel-->';
    echo '<div class="carousel-inner">';
    echo '<div class="item active" >';
    getThumb($slide['img'], $cat['nome'], $cat['nome'], '1200', '700', '', '', '#', 't');
    echo '<div class="carousel-caption">
             		<h4>' . $cat['nome'] . '</h4>                    
                    </div>
                </div>';
    $slidemenu = $slide['id'];
    $readSlide = read('carroussel', "WHERE cat_id = '{$cat['id']}' AND id != '{$slidemenu}' ORDER BY data DESC");
    foreach ($readSlide as $slide) {
        echo '<div class="item">';
        getThumb($slide['img'], $cat['nome'], $cat['nome'], '1200', '700', '', '', '#', 't');
        echo '<div class="carousel-caption">
             		<h4>' . $cat['nome'] . '</h4>                   
                    </div>
                </div>';
    }
    ?>
                
    </div>
    <a href="#carrossel" class="carousel-control left" data-slide="prev" >&lsaquo;</a>
    <a href="#carrossel" class="carousel-control right" data-slide="next">&rsaquo;</a> 
    </section> <!--section carrossel-->      
    <?php 
}
#################################################### FIM DO CARROUSSEL#################################################
?>
예제 #12
0
$pag = empty($url[3]) ? '1' : $url[3];
$maximo = 8;
$inicio = $pag * $maximo - $maximo;
if ($cat['id_pai'] != '') {
    $readArtigos = read('up_posts', "WHERE categoria = '{$cat['id']}' AND tipo = 'post' AND status = '1' ORDER BY data DESC LIMIT {$inicio}, {$maximo}");
} else {
    $readArtigos = read('up_posts', "WHERE cat_pai = '{$cat['id']}' AND tipo = 'post' AND status = '1' ORDER BY data DESC LIMIT {$inicio}, {$maximo}");
}
foreach ($readArtigos as $art) {
    $catcon++;
    echo '<li';
    if ($catcon % 4 == 0) {
        echo ' class="last"';
    }
    echo '>';
    getThumb($art['thumb'], $art['tags'], $art['titulo'], '200', '150', '', '', BASE . '/artigo/' . $art['url'], 't');
    echo '<p class="data">' . date('d/m/Y H:i', strtotime($art['data'])) . '</p>';
    echo '<p class="titulo"><a title="Ver mais de ' . $art['titulo'] . '" href="' . BASE . '/artigo/' . $art['url'] . '" class="link">' . lmWord($art['titulo'], 50) . '</a></p>';
    echo '</li>';
}
echo '</ul>';
$link = BASE . '/categoria/' . $cat['url'] . '/page/';
if ($cat['id_pai'] != '') {
    readPaginator('up_posts', "WHERE categoria = '{$cat['id']}' AND tipo = 'post' AND status = '1' ORDER BY data DESC", $maximo, $link, $pag, '870px');
} else {
    readPaginator('up_posts', "WHERE cat_pai = '{$cat['id']}' AND tipo = 'post' AND status = '1' ORDER BY data DESC", $maximo, $link, $pag, '870px');
}
?>
          
</div><!-- /categoria -->
</div><!-- //content -->
예제 #13
0
        </div>
         	<div class="works-single hidden"></div>
            
			<br class="clear">
             
        <div id="post-list" class="row">  
            <?php 
while (have_posts()) {
    the_post();
    ?>
	
            <?php 
    // THUMBNAIL & CSS CLASS
    $cthumbnail = getThumb($thumb);
    //forresponsive
    $getfull = getThumb('large');
    // RESET TO ARRAYS
    $draught_links = array();
    $draught_links_q = array();
    // AJAX TOKEN
    $token = wp_create_nonce("wp_token");
    // POST CATEGORIES
    $categories = "";
    $categories_q = "";
    $terms = get_the_terms($post->ID, 'works-categories', 'string');
    if ($terms && !is_wp_error($terms)) {
        $draught_links = array();
        $draught_links_q = array();
        foreach ($terms as $term) {
            $draught_links[] = $term->name;
            $draught_links_q[] = $term->slug;
예제 #14
0
     addPics();
     break;
 case 'addPicsSimple':
     addPicsSimple();
     break;
 case 'commentPost':
     commentPost();
     break;
 case 'galIndex':
     galIndex();
     break;
 case 'getImg':
     getImg();
     break;
 case 'getThumb':
     getThumb();
     break;
 case 'ratePic':
     ratePic();
     break;
 case 'recentMoves':
     recentMoves();
     break;
 case 'showAlbum':
     showAlbum();
     break;
 case 'showPic':
     showPic();
     break;
 case 'showSlide':
     showSlide();
예제 #15
0
echo '<p style="margin:0;">Sua pesquisa retornou <strong>';
echo count($readPequisa);
echo '</strong> resultados!</p>';
if (count($readPequisa) <= 0) {
    echo '<br /><h2>Desculpe, sua pesquisa não retornou resultados.</h2>';
    echo '<p>Você pode tentar outros termos, ou navegar em nosso menu! Talvez você queira resumir sua pesquisa. 
				Pesquisas com muitas palavras as vezes não retornam resultados!</p>';
} else {
    echo '<ul class="searchlist">';
    $pag = empty($url[3]) ? '1' : $url[3];
    $maximo = 7;
    $inicio = $pag * $maximo - $maximo;
    $readSearch = read('up_posts', "WHERE tipo = 'post' AND status = '1' AND (titulo LIKE '%{$search}%' OR content LIKE '%{$search}%' OR tags LIKE '%{$search}%') ORDER BY data DESC LIMIT {$inicio}, {$maximo}");
    foreach ($readSearch as $pesquisa) {
        echo '<li>';
        getThumb($pesquisa['thumb'], $pesquisa['tags'], $pesquisa['titulo'], '180', '100', '', '', '#', 't');
        echo '<a href="' . BASE . '/artigo/' . $pesquisa['url'] . '" title="Ver mais de ' . $pesquisa['titulo'] . '">' . $pesquisa['titulo'] . '</a>';
        echo '</li>';
    }
    echo '</ul><!-- /searchlist -->';
    $link = BASE . '/pesquisa/' . str_replace(' ', '-', $search) . '/page/';
    readPaginator('up_posts', "WHERE tipo = 'post' AND status = '1' AND (titulo LIKE '%{$search}%' OR content LIKE '%{$search}%' OR tags  LIKE '%{$search}%') ORDER BY data DESC", $maximo, $link, $pag, '540px');
}
?>
 
          
    </div><!-- // content -->
    
    <div class="sidebar">
    	<?php 
setArq('tpl/sidebar');
예제 #16
0
파일: functions.php 프로젝트: qwazix/viood
/**
 * Prints the html required to show a gallery
 * @global string $base_url from config.php
 * @global string $pictureDir from config.php
 * @param string $path the path of the gallery we're printing div's from
 * @param array the array with the directory structure
 */
function print_divs($path, $array)
{
    global $base_url;
    global $pictureDir;
    $rel_path = str_replace($pictureDir, "", $path);
    foreach ($array as $name => $item) {
        if ($name == "__info__") {
            continue;
        }
        if (is_array($item) && count($item)) {
            $info = array_shift($item);
            //check if hidden
            if (!isset($info['hidden']) || $info['hidden'] == false) {
                //check json for flagship
                if (isset($info['flagship']) && file_exists($path . "/" . $name . "/" . $info['flagship'])) {
                    $galleryFlagship = $info['flagship'];
                } else {
                    $galleryFlagship = reset($item);
                }
                ?>
<a class="gallery" href="<?php 
                echo $name;
                ?>
/"><!--
                    --><div class="galleryOverlay"><h3><?php 
                echo $info["name"];
                ?>
</h3><?php 
                echo $info["description"];
                ?>
</div>
                    <img class="gallery" src="<?php 
                echo getThumb($path . "/" . $name . "/" . $galleryFlagship);
                ?>
"/></a><?php 
            }
        } else {
            //sorry for the mess we must not have any spaces between inline-block items
            ?>
<a href="<?php 
            echo $base_url . "slideshow" . $rel_path . $item;
            ?>
"/><img class="picture" src="<?php 
            echo getThumb($path . $item);
            ?>
"/></a><?php 
        }
    }
}
예제 #17
0
파일: relay.php 프로젝트: kkappel/relay
function regenerateThumbs()
{
    global $thumbnailPrefix, $database;
    logAction('regenerateThumbs', '');
    // Get all virt. dirs
    $query = "select * from {$GLOBALS['tablePrefix']}clients";
    $response = mysql_query($query, $database);
    // Put all virt. directory paths into an array
    $dirs = array();
    while ($client = mysql_fetch_assoc($response)) {
        $folder = $client['path'] . '/' . $client['name'];
        $dirs[] = $folder;
    }
    // Remove any nested virt. directories
    $conDirs = condensePathsArray($dirs);
    // Regen thumbs for each virt. directory
    foreach ($conDirs as $folder) {
        $filestructure = directoryToArray($folder, true);
        foreach ($filestructure as $item) {
            $name = $item['name'];
            $type = $item['type'];
            $path = '/' . $item['path'];
            if ($type == 'file') {
                // Remove pre-existing thumb
                if (startsWith($name, $thumbnailPrefix)) {
                    unlink($path . '/' . $name);
                }
                getThumb($path, $name, true);
            }
        }
    }
}
예제 #18
0
function magiczoom_callback($matches)
{
    if (preg_match("/data\\/Stick_Gallery/ims", $matches[0])) {
        return $matches[0];
    }
    //Product Label module support
    $plugin = $GLOBALS["magictoolbox"]["magiczoom"];
    $plugin_enabled = true;
    $result = $matches[0];
    if (!preg_match("/class\\s*=\\s*[\\'\"]\\s*(?:[^\"\\'\\s]*\\s)*thickbox(?:\\s[^\"\\'\\s]*)*\\s*[\\'\"]/iUs", $matches[0]) && !preg_match("/class\\s*=\\s*[\\'\"]\\s*(?:[^\"\\'\\s]*\\s)*fancybox(?:\\s[^\"\\'\\s]*)*\\s*[\\'\"]/iUs", $matches[0]) && !preg_match("/class\\s*=\\s*[\\'\"]\\s*(?:[^\"\\'\\s]*\\s)*lightbox(?:\\s[^\"\\'\\s]*)*\\s*[\\'\"]/iUs", $matches[0]) && !preg_match("/class\\s*=\\s*[\\'\"]\\s*(?:[^\"\\'\\s]*\\s)*cloud\\-zoom.*?(?:\\s[^\"\\'\\s]*)*\\s*[\\'\"]/iUs", $matches[0]) && !preg_match("/class\\s*=\\s*[\\'\"]\\s*(?:[^\"\\'\\s]*\\s)*colorbox(?:\\s[^\"\\'\\s]*)*\\s*[\\'\"]/iUs", $matches[0]) && !preg_match("/rel\\s*=\\s*[\\'\"]\\s*(?:[^\"\\'\\s]*\\s)*colorbox(?:\\s[^\"\\'\\s]*)*\\s*[\\'\"]/iUs", $matches[0]) && !preg_match("/rel\\s*=\\s*[\\'\"]\\s*(?:[^\"\\'\\s]*\\s)*prettyPhoto\\[gallery\\](?:\\s[^\"\\'\\s]*)*\\s*[\\'\"]/iUs", $matches[0])) {
        $plugin_enabled = false;
    }
    if ($plugin_enabled) {
        $shop_dir = str_replace('system/', '', DIR_SYSTEM);
        $image_dir = str_replace($shop_dir, '', DIR_IMAGE);
        $title = $GLOBALS['magictoolbox']['prods_info']['name'];
        $title = htmlspecialchars(htmlspecialchars_decode($title, ENT_QUOTES));
        $description = $GLOBALS['magictoolbox']['prods_info']['description'];
        $description = htmlspecialchars(htmlspecialchars_decode($description, ENT_QUOTES));
        $img = preg_replace("/^.*?href\\s*=\\s*[\"\\'].*\\/(.*?)-\\d+x\\d+.*[\"\\'].*\$/is", "\$1", $matches[1]);
        $img = preg_replace('/([\\(\\)\\-\\+])/is', '\\\\$1', $img);
        // REALLY, all escaped now =)
        $original_image = false;
        if (isset($GLOBALS['magictoolbox'][strtoupper('magiczoom') . '_MAIN_IMAGE_AFFECTED'])) {
            foreach ($GLOBALS['magictoolbox']['prods_info']['images'] as $image) {
                if (preg_match('/.*?' . $img . '\\.(png|jpg|jpeg|gif)/is', $image['image'])) {
                    $original_image = $image['image'];
                }
            }
        } else {
            $original_image = $GLOBALS['magictoolbox']['prods_info']['image'];
        }
        if (!$original_image) {
            return $matches[0];
        }
        $id = $GLOBALS['magictoolbox']['prods_info']['product_id'];
        $original_image = $image_dir . $original_image;
        $img = getThumb($original_image, 'original', $id);
        $selector = getThumb($original_image, 'selector', $id);
        $medium = getThumb($original_image, null, $id);
        $thumb = $selector;
        if ($plugin->type == 'standard') {
            if (!isset($GLOBALS['magictoolbox'][strtoupper('magiczoom') . '_MAIN_IMAGE_AFFECTED'])) {
                $additional_result = $plugin->subTemplate(compact('title', 'img', 'medium', 'thumb', 'id'));
                $GLOBALS['magictoolbox'][strtoupper('magiczoom') . '_MAIN_IMAGE_AFFECTED'] = '';
                // $additional_result;
                $thumb = getThumb($original_image, null, $id);
                $result = $plugin->template(compact('img', 'thumb', 'id', 'title', 'description'));
                $GLOBALS['magictoolbox']['MagicZoom']['selectors'][] = $additional_result;
                $GLOBALS['magictoolbox']['MagicZoom']['main'] = $result;
                return 'MAGICTOOLBOX_PLACEHOLDER';
            } else {
                $result = $plugin->subTemplate(compact('title', 'img', 'medium', 'thumb', 'id'));
                $GLOBALS['magictoolbox']['MagicZoom']['selectors'][] = $result;
                return '';
            }
        } else {
            if ($plugin->type == 'circle') {
                if (!isset($GLOBALS['magictoolbox'][strtoupper('magiczoom') . '_MAIN_IMAGE_AFFECTED'])) {
                    $result = 'magiczoom_MAIN_IMAGE';
                    $GLOBALS['magictoolbox'][strtoupper('magiczoom') . '_MAIN_IMAGE_AFFECTED'] = $matches[0];
                } else {
                    $result = $matches[0];
                }
                $GLOBALS['magictoolbox']['items'][] = array('medium' => $medium, 'img' => $thumb);
            }
        }
    }
    return $result;
}
예제 #19
0
파일: search.php 프로젝트: SimTabi/tribble
" class="post-hover">
            <span class="title"><?php 
    echo character_limiter($post->post_title, 12);
    ?>
</span>
            <span class="desc"><?php 
    echo word_limiter($post->post_text, 20);
    ?>
</span>
            <em><?php 
    echo strftime('%B %d, %Y', mysql_to_unix($post->post_date));
    ?>
</em>              
          </a>
          <img src="<?php 
    echo cdn_url(getThumb($post->post_image_path));
    ?>
"  alt="<?php 
    echo $post->post_title;
    ?>
" />
        </div>
        <div class="post-tools">
          <p class="ico"><a href="" class="comments"><?php 
    echo $post->post_reply_count;
    ?>
</a>Comments</p>
          <p class="ico"><a href="" class="likes"><?php 
    echo $post->post_like_count;
    ?>
</a>likes</p>  
 function preview()
 {
     $id = $this->_getid('id', 0);
     if (!$id) {
         showError('参数丢失');
     }
     $rs = M('ste_goods')->where(array('gid' => $id))->find();
     if (!$rs) {
         showError('商品不存在');
     }
     steadmin::$adminInfo['city_id'] = 3301;
     $goodPic = $rs['goods_pic'];
     $rs['goods_tips'] = parent::_getTipsGroupList($this->steSetting['goods_tips'], $rs['goods_tips']);
     $rs['goods_pic'] = getImgUrl(getThumb($goodPic, 0));
     $rs['orig_pic'] = getImgUrl(getThumb($goodPic, 2));
     if ($rs['is_realtime'] && $rs['booked_time']) {
         $rs['goods_desc'] = '<p><img src="' . getImgUrl('statics/default/images/steward/2015/presell_' . $rs['booked_time'] . '.png') . '"/></p><br/>' . $rs['goods_desc'];
     }
     $rs['goods_desc'] = htmlspecialchars_decode($rs['goods_desc']);
     $rs['is_delay'] = parent::_getShopName($rs['shop_id'], 'is_delay');
     $rs['cate_name'] = parent::_getCateName($rs['cate_id']);
     $rs['shop_name'] = parent::_getShopName($rs['shop_id'], 'shop_name');
     $rs['order_counts'] = $rs['order_counts'] * 3;
     ////2015-03-31 新增刷新销量
     $list = explode(',', 'is_delay,gid,cate_id,shop_id,shop_name,goods_name,goods_subtitle,goods_spec,goods_tips,goods_pic,orig_pic,original_price,price_pre,price,goods_desc,order_counts,sale_counts,storage_counts,is_realtime,is_hot,is_new,is_recommend,is_limited,limit_counts');
     foreach ($list as $val) {
         $rs['goodsData'][$val] = $rs[$val];
     }
     $rs['goodsData'] = json_encode($rs['goodsData']);
     if (!$rs['status'] || $rs['status'] == 2) {
         $rs['sale_status'] = 0;
     }
     if ($rs['start_times'] <= TIME) {
         if ($rs['end_times'] < TIME) {
             $rs['sale_status'] = 0;
         } elseif ($rs['end_times'] >= TIME) {
             $rs['sale_status'] = 1;
         }
     } else {
         $rs['sale_status'] = 2;
     }
     $rs['sale_time'] = outTime($rs['start_times']);
     //        z($rs);
     $this->assign(array('id' => $id, 'rs' => $rs, 'vid' => 0));
     $this->display();
 }