本文整理汇总了PHP中get_thumb函数的典型用法代码示例。如果您正苦于以下问题:PHP get_thumb函数的具体用法?PHP get_thumb怎么用?PHP get_thumb使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_thumb函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: while
}
$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 proid=' . $_POST["key"], 'order by proid desc');
} else {
// loadPaging(&$start,&$nume,$limit=20,$where='',$order='order by id desc');
$res = $tbl->loadPaging($start, $nume, $limit, '', 'order by proid desc');
}
if ($res) {
while ($row = mysql_fetch_array($res)) {
$tbl_pro = new table('products');
$res_pro = $tbl_pro->loadOne('id=' . $row['proid']);
$row_pro = mysql_fetch_array($res_pro);
$thumb_img = get_thumb('../Images/Products/', $row['image']);
?>
<tr>
<td class="first style1">
<a href="<?php
echo loadPage('editimg&id=' . $row['id']);
?>
"><?php
echo $row['name'];
?>
</a>
</td>
<td><a href="<?php
echo loadPage('editimg&id=' . $row['id']);
?>
开发者ID:aile54,项目名称:akachan,代码行数:31,代码来源:img.php
示例17: foreach
$__LIST__ = $img_list;
if (count($__LIST__) == 0) {
echo "";
} else {
foreach ($__LIST__ as $key => $val) {
$mod = $i % 2;
++$i;
?>
<li class="album_<?php
echo $val['id'];
?>
"><a href="javascript:void(0)" onclick="del_album(<?php
echo $val['id'];
?>
);"><img src="__STATIC__/css/admin/bgimg/tv-collapsable.gif" /></a><a><img src="<?php
echo attach(get_thumb($val['url'], '_b'), 'item');
?>
" style="width:80px;height:60px; border:solid 1px #000; "/></a></li><?php
}
}
} else {
echo "";
}
?>
</ul><div class="cb"></div><table width="100%" cellpadding="2" cellspacing="1" class="table_form" id="first_upload_file"><tbody class="uplode_file"><tr><th width="100" align="left"><a href="javascript:void(0);" class="blue" onclick="add_file();"><img src="__STATIC__/css/admin/bgimg/tv-expandable.gif" /></a>上传文件 :</th><td><input type="file" name="imgs[]"></td></tr></tbody></table></div><div class="content_list pad_10 hidden"><table width="100%" cellpadding="2" cellspacing="1" class="table_form"><tr><th width="120"><?php
echo L('seo_title');
?>
:</th><td><input type="text" name="seo_title" class="input-text" size="60" value="<?php
echo $info["seo_title"];
?>
"></td></tr><tr><th><?php
开发者ID:weixiang,项目名称:wxshop,代码行数:31,代码来源:55d2bea004a784b09808ae401cfe459f.php
示例18: foreach
$__LIST__ = $item;
if (count($__LIST__) == 0) {
echo "";
} else {
foreach ($__LIST__ as $key => $vo) {
$mod = $i % 2;
++$i;
?>
<li id="cart_item_<?php
echo $vo["id"];
?>
"><p class="goods_info"><span class="img"><a href="<?php
echo U('item/index', array('id' => $vo['id']));
?>
" ><img src="<?php
echo attach(get_thumb($vo['img'], '_m'), $_SESSION['user_token'] . '/item');
?>
" height="80" width="80"></a></span><span class="tit"><a href="<?php
echo U('item/index', array('id' => $vo['id']));
?>
" ><?php
echo $vo["name"];
echo $vo["spec_1"];
echo $vo["spec_2"];
?>
</a><br><span>价格:</span><span class="price1">¥<?php
echo $vo["price"];
?>
</span><br><span>数量:</span><input type ="hidden" id="spec_id_<?php
echo $vo["id"];
?>
开发者ID:yaks,项目名称:weixinshop,代码行数:31,代码来源:410facb107d20a57943f71d35e7d682e.php
示例19: foreach
</thead>
<tbody>
<?php
if (is_array($order_detail)) {
$i = 0;
$__LIST__ = $order_detail;
if (count($__LIST__) == 0) {
echo "";
} else {
foreach ($__LIST__ as $key => $vo) {
$mod = $i % 2;
++$i;
?>
<tr class="">
<td><img width="68" alt="nopic" src="<?php
echo attach(get_thumb($vo['img'], '_b'), session('token') . '/item');
?>
"></td>
<td class="ltd">
<?php
echo $vo["title"];
?>
<?php
echo $vo["spec_1"];
?>
<?php
echo $vo["spec_2"];
?>
</td>
开发者ID:yaks,项目名称:weixinshop,代码行数:31,代码来源:19469ba7b1c7a28a865c26bdd4918782.php
示例20: home_page
private function home_page()
{
$request = $_REQUEST;
define('API_HOME_PAGE', 'yes');
global $cbvid;
$videos = $cbvid->get_videos(array('featured' => 'yes', 'limit' => 10, 'order' => 'featured_date DESC', 'has_mobile' => 'yes'));
global $userquery;
$new_videos = array();
if ($videos) {
foreach ($videos as $video) {
$video['title'] = utf8_encode($video['title']);
$video['description'] = utf8_encode($video['description']);
$video['thumbs'] = array('default' => get_thumb($video), 'big' => get_thumb($video, 'big'), '640x480' => get_thumb($video, '640x480'));
if (function_exists('get_mob_video')) {
$video['videos'] = array('mobile' => get_mob_video(array('video' => $video)));
if ($video['has_hd'] == 'yes') {
$video['videos']['hq'] = get_hq_video_file($video);
}
}
$video['url'] = $video['video_link'] = $video['videoLink'] = videoLink($video);
$video['avatar'] = $video['user_photo'] = $video['displayPic'] = $userquery->avatar($video);
$video['avatars']['medium'] = $userquery->avatar($video, 'small');
$video['avatars']['xmedium'] = $userquery->avatar($video, 'xmedium');
$video['avatars']['large'] = $userquery->avatar($video, 'large');
$new_videos[] = $video;
}
}
$featured = $new_videos;
$categories = $cbvid->getCbCategories(array('cond' => " ( category_id = '1' OR category_id = '16' OR category_id = '26' OR category_id = '15' ) ", 'limit' => 4, 'type' => 'v'));
$cat_videos = array();
foreach ($categories as $category) {
$cat_vid = array('name' => $category['category_name'], 'id' => $category['category_id']);
$videos = $cbvid->get_videos(array('limit' => 10, 'category' => $category['category_id'], 'order' => ' date_added desc '));
$new_videos = array();
if ($videos) {
foreach ($videos as $video) {
$video['title'] = utf8_encode($video['title']);
$video['description'] = utf8_encode($video['description']);
$video['thumbs'] = array('default' => get_thumb($video), 'big' => get_thumb($video, 'big'), '640x480' => get_thumb($video, '640x480'));
if (function_exists('get_mob_video')) {
$video['videos'] = array('mobile' => get_mob_video(array('video' => $video)));
if ($video['has_hd'] == 'yes') {
$video['videos']['hq'] = get_hq_video_file($video);
}
}
$video['url'] = $video['video_link'] = $video['videoLink'] = videoLink($video);
$video['avatar'] = $video['user_photo'] = $video['displayPic'] = $userquery->avatar($video);
$video['avatars']['medium'] = $userquery->avatar($video, 'medium');
$video['avatars']['xmedium'] = $userquery->avatar($video, 'xmedium');
$video['avatars']['large'] = $userquery->avatar($video, 'large');
$new_videos[] = $video;
}
}
$cat_vid['videos'] = $new_videos;
$cat_videos[] = $cat_vid;
}
$home = array('featured' => $featured, 'categories' => $cat_videos);
//echo json_encode($home);
if (!empty($featured) || !empty($cat_videos)) {
$data = array('code' => "200", 'status' => "success", "msg" => "Success", "data" => $home);
$this->response($this->json($data));
} else {
$data = array('code' => "204", 'status' => "success", "msg" => "No Record Found", "data" => "");
$this->response($this->json($data));
}
}
开发者ID:Coding110,项目名称:cbvideo,代码行数:66,代码来源:get.php
注:本文中的get_thumb函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论