当前位置: 首页>>代码示例>>PHP>>正文


PHP get_thumb函数代码示例

本文整理汇总了PHP中get_thumb函数的典型用法代码示例。如果您正苦于以下问题:PHP get_thumb函数的具体用法?PHP get_thumb怎么用?PHP get_thumb使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了get_thumb函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: my_unlink

function my_unlink($file, $file2 = '')
{
    if (!empty($file) && file_exists($file) && $file2 != $file) {
        //删除大图
        $thumb = get_thumb($file);
        unlink($file);
        //删除缩略图
        if (!empty($thumb) && file_exists($thumb)) {
            unlink($thumb);
        }
    }
}
开发者ID:aidear,项目名称:100event,代码行数:12,代码来源:My_function_helper.php

示例2: delete_file

 function delete_file($path = '', $files = array())
 {
     foreach ($files as $file) {
         if (file_exists($path . $file)) {
             $thumb = get_thumb($file);
             if ($thumb != '') {
                 if (file_exists($path . $thumb)) {
                     unlink($path . $thumb);
                 }
                 unlink($path . $file);
             }
         }
     }
 }
开发者ID:khanals,项目名称:rbs-ext,代码行数:14,代码来源:MY_file_helper.php

示例3: index

 public function index()
 {
     import("@.ORG.Page");
     $db = M('photo');
     if ($wechatid = I('wechatid')) {
         $map = array('wechatid' => $wechatid);
     } else {
         $map = array();
     }
     $count = $db->where($map)->count();
     $Page = new Page($count, 20);
     $list = $db->where($map)->order('id desc')->limit($Page->firstRow . ',' . $Page->listRows)->select();
     foreach ($list as $key => $val) {
         $list[$key]['thumb'] = get_thumb($val['photo']);
         $list[$key]['uname'] = M('wechatuser')->where(array('wechatid' => $val['wechatid']))->getField('uname');
     }
     $show = $Page->show();
     $this->assign('show', $show);
     $this->assign('list', $list);
     $this->display();
 }
开发者ID:zmou,项目名称:service,代码行数:21,代码来源:AjaxAction.class.php

示例4: get_post_meta

		
		//slider z aktualnosciami
		foreach( $myposts as $post ) {
			setup_postdata($post);
			
			/*echo get_the_title();
			 $meta_values = get_post_meta($post->ID, 'pokaz_w_aktualnosciach' );
			print_r($meta_values);
			echo '<div style="display: block; height: 48px; clear:both;"></br></div>';
			continue;*/

			$opis= short_opis(200);	
			
			$title = get_the_title();
			//$img = 'timthumb.php?src='.get_field("zdjecie").'&w=210&h=210';
			$full = get_thumb();
			$thumb = site_url().'/resize/138x144x1/r/'. dm_relative($full);	
					
			
			$postType = get_post_type();
			$postTypeObj = get_post_type_object($postType);
			$cat = $postTypeObj->labels->name;
			$catUrl = get_post_type_archive_link($postType);
			$data = get_the_date("d.m.Y");
			$link = get_permalink();
			
		//	the_4col_item($thumb, $tytul, $data,  $catUrl, $cat, $opis, $link);		
		?>
		
				<li class="dm_przedmioty">
				<div class="row">
开发者ID:skonina,项目名称:teatrbaza,代码行数:30,代码来源:archive-aktualnosci.php

示例5: array

        $field = array('name', 'image', 'ordering', 'alias');
        $img = edit_img('../', 'uploads/chuyenmuc/', 'chuyenmuc', 'image', $_POST['tmpimage'], $id, 30, 30);
        $values = array(format($_POST["name"], 0), format($img, 0), format($_POST['ordering'], 0), format(convert($_POST["name"]), 0));
        // updateObject($field=array(),$value=array(),$where)
        $res = $tbl->updateObject($field, $values, 'id=' . $id);
        if ($res) {
            header('location: ' . loadPage('chuyenmuc'));
        }
    } else {
        echo "Lỗi trùng tên. Vui lòng nhập tên khác.";
    }
}
$res = $tbl->loadOne('id=' . $id);
if ($res) {
    $row = mysql_fetch_array($res);
    $thumb_img = get_thumb('uploads/chuyenmuc/', $row['image']);
    ?>
<div id="center-column">
			<div class="top-bar">
			  <h1>Chuyên mục riêng</h1>
				<div class="breadcrumbs"><a href="<?php 
    echo loadPage('chuyenmuc');
    ?>
">Chuyên mục riêng</a> / <a href="#">Sửa</a></div>
			</div><br />
 
		  
		  
			<div class="table">
				<img src="img/bg-th-left.gif" width="8" height="7" alt="" class="left" />
				<img src="img/bg-th-right.gif" width="7" height="7" alt="" class="right" />
开发者ID:aile54,项目名称:akachan,代码行数:31,代码来源:edit.php

示例6: foreach

            
                <div class="ware">
                 <?php 
if (is_array($item_detail)) {
    $i = 0;
    $__LIST__ = $item_detail;
    if (count($__LIST__) == 0) {
        echo "";
    } else {
        foreach ($__LIST__ as $key => $item) {
            $mod = $i % 2;
            ++$i;
            ?>
<div class="ware_list">
                        <div class="ware_pic"><img src="<?php 
            echo attach(get_thumb($item['img'], '_b'), 'item');
            ?>
" height="50" width="50"></div>
                        <div class="ware_text">
                            <div class="ware_text1">
                                <a href="#"><?php 
            echo $item["title"];
            ?>
</a><br>
                                <span></span>
                            </div>
                            <div class="ware_text2">
                                <span>数量:<strong><?php 
            echo $item["quantity"];
            ?>
</strong></span>
开发者ID:norain2050,项目名称:shiliugang,代码行数:30,代码来源:016ed60989363c7645300a91fdc6ad13.php

示例7: while

        while (have_rows('residency_dates')) {
            the_row();
            $start_date_dt = new DateTime(get_sub_field('start_date', $resident_id));
            $start_date = $start_date_dt->format('M j, Y');
            $end_date_dt = new DateTime(get_sub_field('end_date', $resident_id));
            $end_date = $end_date_dt->format('M j, Y');
            $start_year = $start_date_dt->format('Y');
            $end_year = $end_date_dt->format('Y');
        }
    }
} else {
    $no_link = 'nolink';
    $end_date_dt = new DateTime(get_resident_end_date($resident_id));
    $end_year = $end_date_dt->format('Y');
}
$thumb = get_thumb($resident_id);
echo '<div class="resident item shelf-item border-bottom ' . $resident_status . ' ' . $no_link . '"><div class="inner">';
if ($bio) {
    echo '<a class="wrap value name" href="' . $url . '">';
}
echo '<h2 class="link title name">' . $title . '</h2>';
echo '<div class="image">';
if ($bio && $thumb) {
    echo '<img src="' . $thumb . '"/>';
}
echo '</div>';
if ($bio) {
    echo '</a>';
}
echo '<div class="details">';
echo '<div class="left">';
开发者ID:OtherMeans,项目名称:iscp-wp-theme,代码行数:31,代码来源:resident.php

示例8: formatCompare

}
if (!isset($start)) {
    $start = 0;
}
$nume = 0;
if (isset($_POST["search"])) {
    // loadPaging(&$start,&$nume,$limit=20,$where='',$order='order by id desc')
    // formatCompare($str,$pos=0)
    $res = $tbl->loadPaging($start, $nume, $limit, 'where name like ' . formatCompare($_POST["key"], 0), 'order by ordering');
} else {
    // loadPaging(&$start,&$nume,$limit=20,$where='',$order='order by id desc')
    $res = $tbl->loadPaging($start, $nume, $limit, '', 'order by ordering');
}
if ($res) {
    while ($row = mysql_fetch_array($res)) {
        $thumb_img = get_thumb('uploads/nsx/', $row['image']);
        ?>
                    
                    <tr>
						<td class="first style1"><a href="<?php 
        echo loadPage('editchuyenmuc&id=' . $row['id']);
        ?>
"><?php 
        echo $row['name'];
        ?>
</a></td>
                        <td><a href="<?php 
        echo loadPage('editchuyenmuc&id=' . $row['id']);
        ?>
"><img src="../<?php 
        echo $thumb_img;
开发者ID:aile54,项目名称:akachan,代码行数:31,代码来源:chuyenmuc.php

示例9: pimage_url

            ?>
 </b></td> <td valign="top"><img border="0" src="<?php 
            echo pimage_url(get_thumb($portfolio->attachment1));
            ?>
" alt="attachment1"/></td>
											</tr>
											<?php 
        }
        if ($portfolio->attachment2) {
            ?>
											<tr>
											<td valign="top"><b><?php 
            echo $this->lang->line('Attachement2:');
            ?>
 </b></td> <td valign="top"><img border="0" src="<?php 
            echo pimage_url(get_thumb($portfolio->attachment2));
            ?>
" alt="attachment2"/></td>
											</tr>
											<?php 
        }
        ?>
										</tbody></table>
									</td></tr>
									<?php 
    }
}
?>
							  </tbody></table>
							  </div>
							  <!--SIGN-UP-->
开发者ID:khanals,项目名称:rbs-ext,代码行数:31,代码来源:viewPortfolio.php

示例10: create_query_limit

}
$search = cbsearch::init_search($type);
$search->limit = create_query_limit($page, $limit);
$search->key = mysql_clean($request['query']);
$results = $search->search();
if ($results) {
    $the_results = array();
    switch ($type) {
        case "video":
        default:
            if ($results) {
                foreach ($results as $video) {
                    $hq_file = get_hq_video_file($video);
                    $video['title'] = title($video['title']);
                    $video['description'] = mob_description($video['description']);
                    $video['thumbs'] = array('default' => get_thumb($video), 'big' => getSmartyThumb(array('vdetails' => $video, 'size' => 'big')));
                    $video['videos'] = array('mobile' => get_mob_video(array('video' => $video)));
                    $video['url'] = $video['video_link'] = $video['videoLink'] = videoLink($video);
                    if (has_hq($video)) {
                        $video['videos']['hd'] = $hq_file;
                    }
                    foreach ($blacklist_fields as $field) {
                        unset($video[$field]);
                    }
                    $the_results[] = $video;
                }
            }
            break;
        case "users":
            if ($results) {
                foreach ($results as $user) {
开发者ID:yukisky,项目名称:clipbucket,代码行数:31,代码来源:search.php

示例11: get_content

 /**
  * get video content for feed
  * 
  * @param INT $id
  * @param ARRAY $content
  */
 function get_content($content, $cond = NULL)
 {
     if (is_array($content)) {
         if ($content['title'] && $content['videoid']) {
             $the_content = $content;
         } elseif ($content['videoid']) {
             $id = $content['videoid'];
         } else {
             return false;
         }
     } else {
         $id = $content;
     }
     if (!$the_content) {
         $the_content = $this->get_video($id);
     }
     if (!$the_content) {
         return false;
     }
     $video_feed_fields = array('title', 'description', 'duration', 'videoid', 'date_added', 'file_server_path', 'files_thumbs_path', 'file_directory', 'file_thumbs_count', 'tags', 'category', 'privacy', 'userid', 'username', 'email', 'fullname');
     $video_feed_fields = apply_filters($video_feed_fields, 'video_content_fields_unsorted');
     $video_fields = array();
     foreach ($video_feed_fields as $vid_field) {
         $video_fields[$vid_field] = $the_content[$vid_field];
     }
     $video_fields['link'] = VideoLink($the_content);
     $video_fields['thumb'] = get_thumb($the_content);
     $video_fields['sub_title'] = setTime($the_content['duration']);
     return $video_fields;
 }
开发者ID:yukisky,项目名称:clipbucket,代码行数:36,代码来源:video.class.php

示例12: getdata

 function getdata($limit = "", $where = "", $orderby = "", $field = "*")
 {
     global $ORDERSTATE;
     $temparray = $this->table_order->getdata($limit, $where, $orderby, $field);
     foreach ($temparray as &$value) {
         //数据处理
         if (empty($value['orderimg'])) {
             $value['showimg'] = $value['goodsimg'];
             $value['orderimg'] = $value['goodsimg'];
         } else {
             $value['showimg'] = get_thumb($value['orderimg']);
         }
         $value['statename'] = $ORDERSTATE[$value['state']];
     }
     return $temparray;
 }
开发者ID:dalinhuang,项目名称:c2my,代码行数:16,代码来源:order.class.php

示例13: get_thumb

<?php 
$index = ["img" => get_thumb($page_img), "title" => "Hidden", "desc" => "This is my Hidden Projects Please don't share with any one", "desc2" => "", "itiration" => sr::hidden()];
?>


@include(get_location("index"))
开发者ID:Ahmed-Badawy,项目名称:ahmed-badawy.com-Website,代码行数:6,代码来源:index.blade.php

示例14: setup_postdata

<?php

global $post;
setup_postdata($post);
$id = $post->ID;
$title = $post->post_title;
$slug = $post->post_name;
$thumb = get_thumb($resident_id, 'thumbnail');
$post_type = $post->post_type;
$permalink = get_permalink($id);
$classes = $slug . ' ' . $post_type;
if ($post_type == 'contributor') {
    $permalink = get_field('website', $id);
}
if ($thumb) {
    $classes .= ' hasthumb';
} else {
    $classes .= ' nothumb';
}
if ($post_type == 'country') {
    $residents_url = get_permalink(get_page_by_path('residents')->ID);
    $permalink = $residents_url . '?filter=all&from=' . $slug;
}
echo '<div class="result item shelf-item border-bottom ' . $classes . '">';
echo '<div class="inner">';
if ($permalink) {
    echo '<a class="wrap" href="' . $permalink . '">';
} else {
    echo '<div class="wrap">';
}
if ($thumb) {
开发者ID:OtherMeans,项目名称:iscp-wp-theme,代码行数:31,代码来源:search.php

示例15: userid

     if (!$uid) {
         $uid = userid();
     }
     $params = array('userid' => $uid, 'limit' => $get_limit);
     $videos = $cbvid->action->get_favorites($params);
     $params['count_only'] = "yes";
     $total_rows = $cbvid->action->get_favorites($params);
     $total_pages = count_pages($total_rows, $get_limit);
     if ($total_rows > 0) {
         $new_videos = array();
         foreach ($videos as $video) {
             if (!$video['email']) {
                 $udetails = $userquery->get_user_details($video['userid']);
             }
             $video = array_merge($video, $udetails);
             $video['thumbs'] = array('default' => get_thumb($video));
             $video['videos'] = array('mobile' => get_mob_video(array('video' => $video)));
             $video['url'] = $video['video_link'] = $video['videoLink'] = videoLink($video);
             $video['avatar'] = $video['user_photo'] = $video['displayPic'] = $userquery->avatar($video);
             foreach ($blacklist_fields as $field) {
                 unset($video[$field]);
             }
             $new_videos[] = $video;
         }
         echo json_encode($new_videos);
     } else {
         echo json_encode(array('err' => lang('No favorite videos were found')));
     }
     break;
 case "get_users":
 case "get_channels":
开发者ID:yukisky,项目名称:clipbucket,代码行数:31,代码来源:get.php


注:本文中的get_thumb函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。