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


PHP get_photos函数代码示例

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


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

示例1: get_issue_photos

 public function get_issue_photos($part_id)
 {
     $part = $this->get($part_id);
     if (!empty($part->diagnostic_issue_id)) {
         return get_photos('diagnostic_issue', null, $part->diagnostic_issue_id, 'miniant');
     }
     return array();
 }
开发者ID:nicolasconnault,项目名称:streamliner,代码行数:8,代码来源:Part_model.php

示例2: mysql_clean

        break;
    case "most_commented":
        $cond['order'] = $table_name . ".total_comments DESC";
        break;
    case "top_rated":
        $cond['order'] = $table_name . ".rating DESC, " . $table_name . ".rated_by DESC";
        break;
}
//Getting Photo List
$page = mysql_clean($_GET['page']);
$get_limit = create_query_limit($page, MAINPLIST);
$clist = $cond;
$clist['limit'] = $get_limit;
$photos = get_photos($clist);
Assign('photos', $photos);
$collections = $cbcollection->get_collections($clist);
Assign('collections', $collections);
//Collecting Data for Pagination
$ccount = $cond;
$ccount['count_only'] = true;
$total_rows = get_photos($ccount);
$total_pages = count_pages($total_rows, MAINPLIST);
//Pagination
$link == NULL;
$extra_params = NULL;
$tag = '<li><a #params#>#page#</a><li>';
$pages->paginate($total_pages, $page, $link, $extra_params, $tag);
subtitle(lang('photos'));
//Displaying The Template
template_files('photos.html');
display_it();
开发者ID:Coding110,项目名称:cbvideo,代码行数:31,代码来源:photos.php

示例3: cb_get_user_uploaded_photos

function cb_get_user_uploaded_photos($content, $key)
{
    global $usercontent, $pages;
    $user = $usercontent->get_current_user();
    $page = mysql_clean(get('page'));
    $limit = create_query_limit($page, config('photo_user_photos'));
    $photos = get_photos(array("limit" => $limit, "user" => $user['userid']));
    $total_rows = get_photos(array("count_only" => true, "user" => $user['userid']));
    $total_pages = count_pages($total_rows, config('photo_user_photos'));
    $pages->paginate($total_pages, $page);
    $params['file'] = 'user_photos.html';
    $params['the_title'] = name($user) . " " . lang('photos');
    $params['photos'] = $photos;
    $params['total_photos'] = $total_rows;
    $params['mode'] = 'uploaded';
    return fetch_template_file($params);
}
开发者ID:yukisky,项目名称:clipbucket,代码行数:17,代码来源:usercontent.class.php

示例4: update_record

    } else {
        update_record($_GET['id'], $_POST);
    }
}
if (!isset($_GET['id'])) {
    header('Location: /');
    exit;
}
$person = load_record($_GET['id']);
if (empty($person)) {
    header('Location: /');
    exit;
}
$updates = get_updates($_GET['id']);
$comments = get_comments($_GET['id']);
$photos = get_photos($_GET['id']);
$searcher = get_searcher($_GET['id']);
$title = $person['fullname'];
//$title = msg('People');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php 
include 'header.php';
?>
	<?php 
include_once "sidebar.php";
?>
	<div id="content">
开发者ID:rmunro,项目名称:SMS-Turks,代码行数:31,代码来源:person.php

示例5: array

            $params = array("group_id" => $groups[$i]['group_id'], "group_videos" => true, "group_topics" => true, "group_members" => true);
            $indexes = $cbindex->count_index("group", $params);
            $fields = $cbindex->extract_fields("group", $params);
            $msg[] = $groups[$i]['group_id'] . ": Updating <strong><em>" . $groups[$i]['group_name'] . "</em></strong>";
            $cbindex->update_index("group", array("fields" => $fields, "values" => $indexes, "group_id" => $groups[$i]['group_id']));
        }
        $i++;
    }
    e($start_index + 1 . " - " . $to . "  groups have been reindexed successfully.", "m");
    assign("index_msgs", $msg);
    assign("indexing", "yes");
    assign('mode', 'index_gps');
}
if (isset($_GET['index_photos'])) {
    $photos = get_photos(array("active" => "yes", "limit" => $start_index . "," . $loop_size));
    $total_photos = get_photos(array("count_only" => true, "active" => "yes"));
    $percent = $cbindex->percent(50, $total_photos);
    $i = 0;
    assign('total', $total_photos);
    assign('from', $start_index + 1);
    $to = $start_index + $loop_size;
    if ($to > $total_photos) {
        $to = $total_photos;
        e($total_photos . " photos have been reindexed successfully.", "m");
        assign("stop_loop", "yes");
    }
    assign('to', $to);
    while ($i < $total_photos) {
        if ($photos[$i]['photo_id']) {
            $params = array("photo_id" => $photos[$i]['photo_id'], "favorite_count" => true, "total_comments" => true);
            $indexes = $cbindex->count_index("photos", $params);
开发者ID:Coding110,项目名称:cbvideo,代码行数:31,代码来源:reindex_cb.php

示例6: coauthors_posts_links

                coauthors_posts_links();
                ?>
</span>
						<?php 
            }
            ?>
					<?php 
        }
        ?>
				</div>
				
				<section class="post-body"> <!-- article text and images -->
				
					<!-- Grab all of the photos associated with article. -->
					<?php 
        $attachments = get_photos(get_the_ID());
        ?>
					
					<?php 
        if (isset($attachments['photos'][0]['src']['medium'])) {
            ?>
					<meta itemprop="thumbnailUrl" content="<?php 
            echo $attachments['photos'][0]['src']['medium'];
            ?>
" />
					<?php 
        }
        ?>
					
					<!--
					// Check if a feature photo exists. If there is a feature photo,
开发者ID:wsander3,项目名称:Pipe-Dream,代码行数:31,代码来源:single-post.php

示例7: get_photos

        if ($uid != 'x') {
            $photos = get_photos(array('limit' => $sqlLimit, 'user' => $uid, 'order' => 'date_added DESC'));
            $total_photos = $u['total_photos'];
            $title = "Photos uploaded by " . $user;
        }
        break;
    case "views":
        $photos = get_photos(array('limit' => $sqlLimit, 'order' => 'views DESC'));
        $title = lang('Most Viewed Photos');
        break;
    case "rating":
        $photos = get_photos(array('limit' => $sqlLimit, 'order' => 'rating DESC, rated_by DESC'));
        $title = lang('Top Rated Photos');
        break;
    case "watching":
        $photos = get_photos(array('limit' => $sqlLimit, 'order' => 'last_viewed DESC'));
        $title = lang('Photos Being Viewed');
        break;
}
subtitle($title);
?>
<rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/">
    <channel>
        <title><?php 
echo cbtitle();
?>
</title>
        <link><?php 
echo BASEURL;
?>
</link>
开发者ID:yukisky,项目名称:clipbucket,代码行数:31,代码来源:rss_photos.php

示例8: get_bille

<?php

// On recherche la bille correspondant au NUM passé en paramètre
include_once 'MODELE/BILLES/get_bille.php';
include_once 'MODELE/BILLES/get_billes.php';
if (!isset($login)) {
    $login = '';
}
$bille = get_bille($sql_detail_bille, $id);
$photos = get_photos_sac($sql_photos_sac, $id);
$autres_photos = get_photos($sql_list_autres_photos, $id);
$mbc_existants = get_liste_inventaire_pour_bille($sql_liste_marque_bille_conditionnement_pour_bille, $login, $id);
//$return = ecrireLog('APP','INFO',$login);
foreach ($bille as $cle => $mabille) {
    $bille['ID_BILLES'] = htmlspecialchars($bille['ID_BILLES']);
    $bille['NOM'] = htmlspecialchars($bille['NOM']);
}
// On affiche la page (vue)
include_once 'VUE/BILLES/v_update_sac.php';
开发者ID:didier-gilles-65,项目名称:bet,代码行数:19,代码来源:c_update_sac.php

示例9: pd_get_category_posts

function pd_get_category_posts($category_id)
{
    // num posts allowed to show up alongside
    // featured. depends on the current category.
    $max_secondary = 0;
    // initialize arrays
    $featured = $secondary = array();
    // if featured post on homepage is in the current category,
    // then set that one as featured.
    foreach (get_the_category(z_get_posts_in_zone('feature-feature')[0]->ID) as $category) {
        if ($category->term_id === $category_id) {
            $featured = objectToArray(z_get_posts_in_zone('feature-feature'));
        }
    }
    // loop through the featured secondary posts and see if
    // any match the current category. if they do, set them as
    // the in the secondary part of the category page.
    foreach (z_get_posts_in_zone('feature-list') as $article) {
        foreach (get_the_category($article->ID) as $category) {
            if ($category->term_id === $category_id) {
                $secondary[] = objectToArray($article);
            }
        }
    }
    // whitelisted categories that support the zoninator layout
    $whitelist = array('news', 'sports', 'opinion', 'release');
    if (!in_array(get_category($category_id)->slug, $whitelist)) {
        return false;
    }
    // if category page is news
    if (get_category_by_slug('news')->term_id === $category_id) {
        // news
        if (!$featured) {
            // if featured on homepage is not from category
            // the use the category's featured image.
            $featured = objectToArray(z_get_posts_in_zone('zone-news-feature'));
        }
        $secondary = array_merge($secondary, objectToArray(z_get_posts_in_zone('zone-news-secondary')), objectToArray(z_get_posts_in_zone('zone-news-list')));
        $max_secondary = 2;
    }
    // if category page is sports
    if (get_category_by_slug('sports')->term_id === $category_id) {
        // sports
        if (!$featured) {
            // if featured on homepage is not from category
            // the use the category's featured image.
            $featured = objectToArray(z_get_posts_in_zone('zone-sports-feature'));
        }
        $secondary = array_merge($secondary, objectToArray(z_get_posts_in_zone('zone-sports-list')));
        $max_secondary = 2;
    }
    // if category page is opinion
    if (get_category_by_slug('opinion')->term_id === $category_id) {
        // opinion
        $featured = wp_get_recent_posts(array('numberposts' => 1, 'category' => 10));
        $secondary = objectToArray(z_get_posts_in_zone('zone-opinion-list'));
        $max_secondary = 3;
    }
    // if category page is release
    if (get_category_by_slug('release')->term_id === $category_id) {
        // opinion
        if (!$featured) {
            // if featured on homepage is not from category
            // the use the category's featured image.
            $featured = objectToArray(z_get_posts_in_zone('zone-release-feature'));
        }
        $secondary = array_merge($secondary, objectToArray(z_get_posts_in_zone('zone-release-list')));
        $max_secondary = 2;
    }
    // determine the featured post in category
    $posts['feature'] = get_post($featured[0]['ID'], 'ARRAY_A');
    $posts['feature']['photos'] = get_photos($posts['feature']['ID'], 1);
    // if the featured article doesn't have a photo,
    // return false so category.php will display the
    // simple article-list layout.
    if (!$posts['feature']['photos']) {
        return false;
    }
    // since there is a photo, we'll display the featured
    // post in the dominant position. therefore, we should
    // exclude it from the article list.
    $posts['exclude'][0] = $posts['feature']['ID'];
    $posts['secondary'] = array();
    foreach ($secondary as $article) {
        // sidebar posts
        if (count($posts['secondary']) < $max_secondary) {
            $posts['secondary'][] = get_post($article['ID'], 'ARRAY_A');
            $posts['secondary'][count($posts['secondary']) - 1]['photos'] = get_photos($article['ID'], 1);
            $posts['exclude'][] = $article['ID'];
        }
    }
    return $posts;
}
开发者ID:wsander3,项目名称:Pipe-Dream,代码行数:93,代码来源:get-category-posts.php

示例10: mysql_clean

            $id = mysql_clean($_GET['delete_orphan_photo']);
            $cbphoto->delete_photo($id);
        }
        if (isset($_POST['delete_orphan_photos'])) {
            $total = count($_POST['check_photo']);
            for ($i = 0; $i < $total; $i++) {
                $cbphoto->delete_photo($_POST['check_photo'][$i], TRUE);
            }
            $eh->flush();
            e(sprintf(lang("total_photos_deleted"), $total), "m");
        }
        $photo_arr = array("user" => userid(), "limit" => $get_limit, 'order' => ' date_added DESC', "get_orphans" => TRUE);
        $collection = $cbphoto->collection->get_collections(array("user" => userid(), "type" => "photos"));
        if (get('query') != '') {
            $photo_arr['title'] = mysql_clean(get('query'));
            $photo_arr['tags'] = mysql_clean(get('query'));
        }
        $photos = get_photos($photo_arr);
        //echo $db->db_query;
        assign('photos', $photos);
        assign('c', $collection[0]);
        $photo_arr['count_only'] = true;
        $total_rows = get_photos($photo_arr);
        $total_pages = count_pages($total_rows, MAINPLIST);
        //Pagination
        $pages->paginate($total_pages, $page);
        subtitle(lang("manage_orphan_photos"));
        break;
}
template_files('manage_photos.html');
display_it();
开发者ID:Coding110,项目名称:cbvideo,代码行数:31,代码来源:manage_photos.php

示例11: get_author_posts_url

					</div>
					<p class="byline" itemprop="author" itemscope itemtype="http://schema.org/Person">
						<a href="<?php 
        echo get_author_posts_url(get_the_author_meta('ID'));
        ?>
" itemprop="url">More photos by <span itemprop="name"><?php 
        the_author();
        ?>
</span></a>
					</p>
				</div>
				<section itemprop="articleBody">
				
					<?php 
        // grab all of the photos to display in the right place.
        $photos = get_photos(get_the_ID(), 1);
        ?>
					
					<?php 
        $width = wp_get_attachment_image_src($post->ID, 'medium');
        $width = $width[1];
        ?>
					
					<figure id="attachment" style="width: <?php 
        echo $width;
        ?>
px;">
						<a href="<?php 
        echo wp_get_attachment_url($post->ID);
        ?>
"><?php 
开发者ID:wsander3,项目名称:Pipe-Dream,代码行数:31,代码来源:image.php

示例12: get_common_variables

 public function get_common_variables($servicequote_id, $review_only = false)
 {
     $servicequote = $this->servicequote_model->get($servicequote_id);
     $order = $this->order_model->get_values($servicequote->order_id);
     $assignment = $this->assignment_model->get(array('diagnostic_id' => $servicequote->diagnostic_id), true);
     $assignment = $this->assignment_model->get_values($assignment->id);
     $technician = $this->user_model->get($assignment->technician_id);
     $technician_name = 'No longer on record';
     if (!empty($technician->id)) {
         $technician_name = $this->user_model->get_name($technician->id);
     }
     $unit = $this->unit_model->get_values($assignment->unit_id);
     $unit['photos'] = get_photos('assignment', null, $unit['id']);
     $diagnostic_issues = $this->diagnostic_issue_model->get(array('diagnostic_id' => $servicequote->diagnostic_id, 'can_be_fixed_now' => 0));
     $issues = array();
     foreach ($diagnostic_issues as $di) {
         $issues[] = "{$di->issue_type_name} {$di->part_type_name}";
     }
     $statuses = $this->servicequote_model->get_statuses($servicequote_id);
     $dropdowns = $this->get_dropdowns($servicequote_id);
     $feature_type = 'Custom Feature';
     $stages = array();
     $raw_stages = array_reverse($this->stages);
     array_pop($raw_stages);
     foreach ($raw_stages as $stage) {
         $page_name = str_replace('_', ' ', ucfirst($stage['url']));
         if ($this->uri->segment(4) == $stage['url']) {
             $stages[] = $page_name;
         } else {
             $stages[] = anchor(base_url() . "miniant/servicequotes/servicequote/{$stage['url']}/{$servicequote_id}/{$review_only}", $page_name);
         }
     }
     return compact('servicequote', 'order', 'assignment', 'technician', 'technician_name', 'issues', 'statuses', 'unit', 'dropdowns', 'servicequote_id', 'feature_type', 'stages');
 }
开发者ID:nicolasconnault,项目名称:streamliner,代码行数:34,代码来源:Servicequote.php

示例13: file_get_contents

    if ($photo && !$photo['error']) {
        $name = $photo['name'];
        $type = $photo['type'];
        $path = $photo['tmp_name'];
        $bytes = file_get_contents($path);
        add_photo($name, $type, $bytes);
        $msg = "<div class = 'alert alert-success' style = 'width: 265px;'>New photo has been uploaded.</div>";
        echo "<script>";
        //go back to viewPhotos page after 3 seconds.
        echo "setTimeout(function(){ document.location = '?p=viewAdmin'; }, 2000);";
        echo "</script>";
    } else {
        $msg = "<div class = 'alert alert-warning' style = 'width: 265px;'>Invalid File!</div>";
    }
}
$photos = get_photos();
?>

<html>
<body>
	<div class="container">
	  <div class="row col-md-4">
	   <div class="box">
			<form method="post" enctype="multipart/form-data">
				<div class="form-group">
					<input type="file" name="photo" />
				</div>
				<div class="form-group">
					<button class="btn" name="upload">Upload</button>
				</div>
			</form>
开发者ID:Jack082595,项目名称:PHP_PROJECT,代码行数:31,代码来源:uploadPhoto.php

示例14: content_56afd77ab2a977_56293857


//.........这里部分代码省略.........
           
                <div class="widget-main">
                    <hr>
                    <table class="table table-stripped table-bordered">
                        <tr>
                            <td>
                                <div class="stats_subitem_d">Total Videos : <strong><?php 
        ob_start();
        echo get_videos(array('count_only' => 'yes'), $_smarty_tpl);
        echo number_format(ob_get_clean());
        ?>
</strong> </div>
                            </td>
                            <td>
                                <div class="stats_subitem_d">Total Groups : <strong><?php 
        echo get_groups(array('count_only' => 'yes'), $_smarty_tpl);
        ?>
</strong> </div>
                            </td>
                            <td>
                                <div class="stats_subitem_d">Total Collection : <strong><?php 
        echo get_collections(array('count_only' => 'yes'), $_smarty_tpl);
        ?>
</strong> </div>
                            </td>
                            <td>
                                <div class="stats_subitem_d">Total Users : <strong><?php 
        echo get_users(array('count_only' => 'yes'), $_smarty_tpl);
        ?>
</strong> </div>
                            </td>
                            <td>
                                <div class="stats_subitem_d">Total Photos: <strong><?php 
        echo get_photos(array('count_only' => 'yes'), $_smarty_tpl);
        ?>
</strong> </div>
                            </td>
                    </table>
                </div>

            </div>
        </div>
    </div>

    <div class="col-md-6">
        <div class="widget-box">
            <div class="widget-header header-color-red">
                <h5><i class="glyphicon glyphicon-book"></i>ClipBucket News</h5>
                <div class="widget-toolbar">
                    <a href="#" data-action="collapse">
                        <i class="icon-chevron-down"></i>
                    </a>
                    <a href="#" data-action="close">
                        <i class="icon-remove"></i>
                    </a>
                </div>
            </div>
            <div class="widget-body">
                <div id="clipbucket_news" class="widget-main" style="height:419px;overflow:auto">
                    
                </div>
            </div>
        </div>
    </div>

    <hr>
开发者ID:reactvideos,项目名称:Website,代码行数:67,代码来源:49fc3041a368292de3fa784c18e159751f38aa9b.file.index.html.php

示例15: mysql_clean

    $Cbucket->show_page = false;
}
//Getting Collection Lists
$page = mysql_clean($_GET['page']);
$get_limit = create_query_limit($page, COLLPP);
$clist = $cond;
$clist['active'] = "yes";
$clist['limit'] = $get_limit;
$collections = $cbcollection->get_collections($clist);
Assign('collections', $collections);
//Getting Photo List
$page = mysql_clean($_GET['page']);
$get_limit = create_query_limit($page, MAINPLIST);
$clist = $cond;
$clist['limit'] = $get_limit;
$clist['order'] = " last_viewed DESC";
$photos = get_photos($clist);
Assign('photos', $photos);
/* CREATING LIMIT1 */
$page = mysql_clean($_GET['page']);
$get_limit = create_query_limit($page, RESULTS);
$carray['limit'] = $get_limit;
if (!empty($carray['order'])) {
    $carray['order'] = $carray['order'] . " DESC";
} else {
    $carray['order'] = "DESC";
}
$collections = $cbcollection->get_collections($carray);
assign('c', $collections);
template_files('view_item.html');
display_it();
开发者ID:reactvideos,项目名称:Website,代码行数:31,代码来源:view_item.php


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