function total_photo($tags) { $o = new phpFlickr('6791ccf468e1c2276c1ba1e0c41683a4'); $d = $o->photos_search(array('tags' => $tags, 'content_type' => 1, 'sort' => 'date-posted-asc', 'extras' => 'url_o,url_l', 'page' => 1, 'per_page' => 500)); print_r("total page :" . $d['pages']); $total_page = $d['pages']; print_r("total photo :" . $d['total']); $total_photo = $d['total']; $dir = str_replace(" ", "_", $tags); system(" mkdir {$dir}"); photo_list($tags, 1, 500); }
function total_photo($tags, $camera) { $o = new phpFlickr('6791ccf468e1c2276c1ba1e0c41683a4'); $d = $o->photos_search(array('tags' => $tags, 'content_type' => 1, 'sort' => 'date-posted-asc', 'camera' => $camera, 'extras' => 'url_o,url_l', 'page' => 1, 'per_page' => 500)); print_r("total page :" . $d['pages']); $total_page = $d['pages']; print_r("total photo :" . $d['total']); $total_photo = $d['total']; for ($page = 1; $total_page >= $page; $page++) { print "page {$page} \n"; if ($total_photo >= 500) { $total_photo -= 500; photo_list($tags, $camera, $page, 500); } else { photo_list($tags, $camera, $page, $total_photo); } } }
function total_photo($tags) { $o = new phpFlickr('6791ccf468e1c2276c1ba1e0c41683a4'); $tags = trim(preg_replace('/\\s\\s+/', ' ', $tags)); $d = $o->photos_search(array('user_id' => $tags, 'content_type' => 1, 'sort' => 'date-posted-asc', 'extras' => 'url_m,url_z', 'page' => 1, 'per_page' => 500)); print_r("total page :" . $d['pages']); $total_page = $d['pages']; print_r("total photo :" . $d['total']); $total_photo = $d['total']; for ($page = 1; $total_page >= $page; $page++) { print "page {$page} \n"; if ($total_photo >= 500) { $total_photo -= 500; photo_list($tags, $page, 500); } else { photo_list($tags, $page, $total_photo); } } }
$img_height = (int) $photofeed->media_group->media_content[0]->height; $img_base = $photofeed->media_group->media_content[0]->url; $np1 = $np + 1; $current_index_text = "<span id='picindex'>{$np1}</span> of {$my_numpics}"; echo "\r\n\t<h3 style='margin-left:3px'>\r\n\t\t<a class='standard' href='?'>相册首页</a> > <a class='standard' href='?albumid={$albumid}'>{$albumname}</a> > {$current_index_text}\r\n\t</h3>\r\n \r\n <table style='margin:0 auto;border:1px solid #ccc;width:99%'>\r\n\t\t<tr valign=top>\r\n\t\t\t<td width='20%' align='left'>\r\n\t\t\t\t<a href='?albumid={$albumid}'>«View Album</a>\r\n\t\t\t</td>\r\n\t\t\t<td width='30%' align='right'>\r\n\t\t\t\t<a onclick='navi(-1);return false;' href='javascript:;' >\t\t\t\r\n\t\t\t\t\t<img border=0 alt='Previous item' src='/images/left.gif'>\r\n\t\t\t\t</a>\r\n\t\t\t</td>\r\n \t\t<td> \r\n\t\t\t</td>\r\n\t\t\t<td width='30%' align='left'> \r\n\t\t\t\t<a onclick='navi(1);return false;' href='javascript:;'>\r\n\t\t\t\t\t<img border=0 alt='Next item' src='/images/right.gif'>\r\n\t\t\t\t</a>\r\n\t\t\t</td>\r\n\t\t\t<td width='20%' align='right'>\r\n\t\t\t\t<a id='zoom' href='{$img_base}' target='_blank' title='察看原图'>\r\n\t\t\t\t\t<img src='/images/zoom_normal.gif' alt='view original'/>\r\n\t\t\t\t</a>\r\n\t\t\t</td>\r\n\t\t</tr>\r\n\t</table>"; $display_height = $max_height; if ($img_height < $display_height) { $display_height = $img_height; } echo "\r\n\t<div id='picbox' style='text-align:center'>\r\n\t\t<span id='imgdes' style='margin-left:2px'>\r\n\t\t\t{$photofeed->media_group->media_description->_t}\r\n\t\t</span>\r\n\t\t<p>\r\n\t\t\t<a border=0 href='javascript:;' onclick='navi(1);return false;' title='点击显示下一张'>\r\n\t\t\t\t<img id='picture' height='{$display_height}px' src='{$img_base}{$smallsize}' class='pwimages' />\r\n\t\t\t</a>\r\n\t\t</p>\r\n\t</div>"; } if ($np >= 0) { show_photo(); } else { if ($albumid) { photo_list(); } else { album_list(); } } function get_json_content($echo = true) { global $photosfeed, $pwa_directory; $album_md5 = md5($albumid) . ".js"; if (true || !is_file($pwa_directory . $album_md5)) { //if ($photosfeed) $photosfeed = get_rss_content(); $src = array(); $des = array(); $total = count($photosfeed->feed->entry); for ($i = 0; $i < $total; $i++) {
<div id="tweet" class="drop"> <h3>Status Module</h3> <?php echo tweet_list(false, true); ?> </div> <div id="bookmarks" class="drop"> <h3>Bookmarks Module</h3> <?php echo bookmark_list(false, true); ?> </div> <div id="photos" class="drop"> <h3>Photos Module</h3> <?php echo photo_list(false, true); ?> </div> <div id="music" class="drop"> <h3>Music Module</h3> <?php echo music_list(false, true); ?> </div> <div id="location" class="drop"> <h3>Location Module</h3> <?php echo location_list(false, true); ?> </div> </div>