• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP get_photos函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: get_photos

             $cond['order'] = " total_favorites DESC";
             break;
         case "most_commented":
             $cond['order'] = " total_comments DESC";
             break;
         case "highest_rated":
             $cond['order'] = " rating DESC, rated_by DESC";
             break;
         case "most_viewed":
             $cond['order'] = " views DESC";
             break;
         case "most_downloaded":
             $cond['order'] = " downloaded DESC";
             break;
     }
     $photos = get_photos($cond);
     if ($photos) {
         foreach ($photos as $photo) {
             assign("photo", $photo);
             $cond['photoBlocks'] .= Fetch("/blocks/photo.html");
         }
         $cond['completed'] = "successfull";
     } else {
         $cond['failed'] = "successfully";
     }
     echo json_encode($cond);
     break;
     /**
      * Getting comments along with template
      */
 /**
开发者ID:yukisky,项目名称:clipbucket,代码行数:31,代码来源:ajax.php


示例17: header

            if ($delete) {
                header('Location: ?section=photos&action=album_list&del=ok');
            }
        }
    } else {
        log_write('Не удалось удалить альбом: не достаточно прав', '0', '1');
        print_error('Не достаточно прав для выполнения действия.');
    }
}
if ($_GET['del'] == 'ok') {
    $message = "Альбом удален";
}
// выводим список фотографий
if ($_GET['action'] == 'list') {
    $limit = "12";
    $photo_list = get_photos($limit);
    $tpl = "photos_list_tpl.php";
}
// просмотр содержимого альбома (фотографий)
if ($_GET['action'] == 'album_view' && isset($_GET['id']) && empty($error)) {
    $limit = "12";
    $photo_list = get_album_photos($_GET['id'], $limit);
    $tpl = "photos_album_view_tpl.php";
}
// Просмотр фотографии
if ($_GET['action'] == 'view' && empty($error)) {
    $view_photo = get_photo($_GET['id']);
    $tpl = "photos_view_tpl.php";
}
// добавление или изменение фотографии
if (($_GET['action'] == 'add' || $_GET['action'] == 'edit') && empty($error)) {
开发者ID:rad-li,项目名称:Cafe-CMS,代码行数:31,代码来源:index.php


示例18: elseif

<?php 
} elseif (is_page()) {
    ?>
	<meta property="og:url" content="<?php 
    echo get_permalink();
    ?>
" />
	<meta property="og:type" content="article" />
	<?php 
    $description = htmlspecialchars(strip_tags(get_the_excerpt()));
    if (!$description) {
        $description = htmlspecialchars(get_custom_excerpt($post->post_content, '25'));
    }
    ?>
	<?php 
    $photos = get_photos(get_the_ID());
    if ($photos) {
        ?>
		<?php 
        foreach ($photos['photos'] as $photo) {
            ?>
			<meta property="og:image" content="<?php 
            echo $photo['src']['large'];
            ?>
" />
		<?php 
        }
        ?>
	<?php 
    } else {
        ?>
开发者ID:wsander3,项目名称:Pipe-Dream,代码行数:31,代码来源:open-graph.php


示例19: mysql_clean

$u = $u ? $u : $_GET['uid'];
$u = $u ? $u : $_GET['u'];
$user = $userquery->get_user_details($u);
$page = mysql_clean($_GET['page']);
if ($user) {
    assign('u', $user);
    assign('p', $userquery->get_user_profile($udetails['userid']));
    $mode = $_GET['mode'];
    switch ($mode) {
        case "photos":
        case "uploaded":
        default:
            $limit = create_query_limit($page, config('photo_user_photos'));
            assign("the_title", $user['username'] . " " . lang('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'));
            break;
        case "favorites":
        case "fav_photos":
        case "favorite":
            $limit = create_query_limit($page, config('photo_user_favorites'));
            assign("the_title", $user['username'] . " " . lang('Favorite') . " " . lang('photos'));
            $favP = array("user" => $user['userid'], "limit", $limit);
            $photos = $cbphoto->action->get_favorites($favP);
            $favP['count_only'] = true;
            $total_rows = $cbphoto->action->get_favorites($favP);
            $total_pages = count_pages($total_rows, config('photo_user_favorites'));
            break;
    }
    assign('photos', $photos);
开发者ID:Coding110,项目名称:cbvideo,代码行数:31,代码来源:user_photos.php


示例20: export_documents

 public function export_documents($format = 'pdf', $invoice_tenancy_id, $order_id)
 {
     ob_end_clean();
     $this->load->model('signature_model');
     $this->load->model('miniant/abbreviation_model');
     $this->load->model('miniant/invoice_tenancy_abbreviation_model');
     $invoice_tenancy = $this->invoice_tenancy_model->get($invoice_tenancy_id);
     $signature = $this->signature_model->get($invoice_tenancy->signature_id);
     $signature_image = $this->signature_model->get_image($invoice_tenancy->signature_id);
     $invoice = $this->invoice_model->get($invoice_tenancy->invoice_id);
     $order = (object) $this->order_model->get_values($invoice->order_id);
     $tenancy = $this->tenancy_model->get($invoice_tenancy->tenancy_id);
     $order->job_site_address = $this->address_model->get_formatted_address($order->site_address_id);
     $abbreviations = $this->abbreviation_model->get_dropdown('description', false);
     $invoice_tenancy_abbreviations = $this->invoice_tenancy_abbreviation_model->get(array('invoice_tenancy_id' => $invoice_tenancy_id));
     foreach ($invoice_tenancy_abbreviations as $key => $invoice_tenancy_abbreviation) {
         $invoice_tenancy_abbreviations[$key]->text = $abbreviations[$invoice_tenancy_abbreviation->abbreviation_id];
     }
     $this->db->where('tenancy_id', $invoice_tenancy->tenancy_id);
     $units = $this->unit_model->get_from_order_id($order_id);
     foreach ($units as $key => $unit) {
         $units[$key]->assignment = (object) $this->assignment_model->get_values($units[$key]->assignment_id);
         $unit_photos = get_photos('assignment', $unit->assignment_id, $unit->id, 'miniant');
         $photos = array();
         $photos['Equipment photos'] = array();
         if (!empty($unit_photos)) {
             foreach ($unit_photos as $photo) {
                 $photos['Equipment photos'][] = $photo;
             }
         }
         if (!empty($units[$key]->assignment->diagnostic_id)) {
             $units[$key]->diagnostic = (object) $this->diagnostic_model->get_values($units[$key]->assignment->diagnostic_id);
             $units[$key]->issues = $this->diagnostic_issue_model->get(array('diagnostic_id' => $units[$key]->diagnostic->id));
             if (!$units[$key]->diagnostic->bypassed) {
                 $has_required_diagnostics = true;
             }
         }
         if (!empty($units[$key]->issues) && !$units[$key]->assignment->hide_issue_photos) {
             foreach ($units[$key]->issues as $diagnostic_issue) {
                 if ($issue_photos = get_photos('diagnostic_issue', null, $diagnostic_issue->id, 'miniant')) {
                     foreach ($issue_photos as $issue_photo) {
                         if (empty($photos["{$diagnostic_issue->issue_type_name} {$diagnostic_issue->part_type_name}"])) {
                             $photos["{$diagnostic_issue->issue_type_name} {$diagnostic_issue->part_type_name}"] = array();
                         }
                         $photos["{$diagnostic_issue->issue_type_name} {$diagnostic_issue->part_type_name}"][] = $issue_photo;
                     }
                 }
             }
         }
         $units[$key]->photos = $photos;
         $parts_used = $this->part_model->get(array('assignment_id' => $unit->assignment_id));
         foreach ($parts_used as $key2 => $part_used) {
             if (empty($part_used->part_name)) {
                 $parts_used[$key2]->part_name = $this->part_type_model->get($part_used->part_type_id)->name;
             }
             if (empty($part_used->quantity)) {
                 $part_used->quantity = $part_used->description;
             }
             if (!empty($part_used->servicequote_id) || empty($part_used->quantity)) {
                 unset($parts_used[$key2]);
             }
         }
         $units[$key]->parts_used = $parts_used;
     }
     $invoice_tenancy_parts = $this->invoice_tenancy_part_model->get(array('invoice_tenancy_id' => $invoice_tenancy_id));
     $parts = array();
     foreach ($invoice_tenancy_parts as $invoice_tenancy_part) {
         $parts[] = $this->part_model->get($invoice_tenancy_part->part_id);
     }
     $this->load->library('miniant_pdf', array('header_title' => "Invoice for {$tenancy->name}", 'header_font_size' => 14));
     $this->miniant_pdf->_config['page_orientation'] = 'portrait';
     $this->miniant_pdf->addpage();
     $this->miniant_pdf->setCellPadding(55);
     $this->miniant_pdf->_config['encoding'] = 'UTF-8';
     $this->miniant_pdf->SetSubject("Invoice for {$tenancy->name}");
     $view_params = array('order' => $order, 'order_dowd' => $this->dowd_model->get_formatted_order_dowd($order->dowd_id, $order->id), 'invoice_tenancy' => $invoice_tenancy, 'abbreviations' => $invoice_tenancy_abbreviations, 'parts' => $parts, 'tenancy' => $tenancy, 'units' => $units, 'signature_image' => $signature_image, 'signature' => $signature);
     $this->miniant_pdf->SetFont($this->miniant_pdf->_config['page_font'], 'B', $this->miniant_pdf->_config['page_font_size']);
     $output = $this->load->view('orders/pdf/invoice_tenancy_template', $view_params, true);
     $this->miniant_pdf->writeHTML($output, false, false, false, false, '');
     $filename = 'tenancy_invoice_' . $invoice_tenancy->id . '.pdf';
     $this->miniant_pdf->output($filename, 'D');
 }
开发者ID:nicolasconnault,项目名称:streamliner,代码行数:82,代码来源:Export.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP get_phrase函数代码示例发布时间:2022-05-15
下一篇:
PHP get_pg_passage函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap