public function show() { $list = $this->SlideDB->where($where)->order('oid asc')->select(); foreach ($list as $key => $val) { $list[$key]['picurl'] = get_img_url($list[$key]['picurl']); } $this->assign('list_slide', $list); $this->display('./views/admin/slide_show.html'); }
function main() { /* 待抓取图片的网页地址 */ $site_name = "http://image.cn.yahoo.com"; $img_url = get_img_url($site_name); $img_url_revised = revise_site($img_url, $site_name); $img_url_unique = array_unique($img_url_revised); //unique array get_pic_file($img_url_unique, "./"); }
<div class="tab-title"><span><a href="/sport/c/6">技术小帖士</a></span></div> <div class="activity_art"> <div class="picScroll-left" id="picScroll-left3"> <div class="bd"> <ul class="picList"> <?php if ($tips_focus) { foreach ($tips_focus as $k => $v) { ?> <li class="pd10" > <div class="pic"><a href="<?php echo site_url('sport/news_show/id/' . $v['id']); ?> " target="_blank"><img src="<?php echo get_img_url($v['img'], '331x179', 10); ?> "/></a></div> <div class="title"><a href="<?php echo site_url('sport/news_show/id/' . $v['id']); ?> " target="_blank"><?php echo $v['title']; ?> </a></div> <div class="des"><?php echo $v['abstract']; ?> </div> </li> <?php
if ($want) { ?> <?php foreach ($want as $key => $s) { ?> <li <?php if (($key + 1) % 3 == 0) { echo 'class="no_mr"'; } ?> > <div class="sp_img"><a target="_blank" href="<?php echo site_url('sport/detail/spid/' . $s['sport_id']); ?> "><img src="<?php echo get_img_url($s['img']['img'], '240x240', 2); ?> "/></a></div> <div class="member_plays_name"><a target="_blank" href="<?php echo site_url('sport/detail/spid/' . $s['sport_id']); ?> "><?php echo $s['name']; ?> </a></div> <div class="plays_info"> <div class="l"> 有多少人玩过:<?php echo $s['played']; ?> 人<br>
<div class="clear"></div> <?php if ($sport_must) { foreach ($sport_must as $k => $v) { ?> <div class="desti_right_imgbox <?php if ($k == 2) { echo "mar12"; } ?> l"> <div class="desti_right_imgbox_img"><a href="<?php echo site_url('sport/detail/spid/' . $v['sport_id']); ?> "><img src="<?php echo get_img_url($v['sportimg'], '268x182', 2); ?> "></a></div> <div class="desti_right_imgbox_txt"><a href="<?php echo site_url('sport/detail/spid/' . $v['sport_id']); ?> "><?php echo $v['name']; ?> </a></div> </div> <?php } } ?> <div class="clear"></div>
function checkImage($url) { return $url ? get_img_url($url) : asset('theme/images/no_image.jpg'); }
<?php foreach ($sport_news as $k => $sn) { ?> <li class="activity_right_imgbox <?php if ($k % 3 == 2) { echo 'mar0'; } ?> l"> <div class="activity_right_imgbox_img" > <a target="_blank" href="<?php echo site_url('sport/news_show/id/' . $sn['id']); ?> "> <img src="<?php echo get_img_url($sn['img'], '230x230', 10); ?> "> </a></div> <div class="jstx_li_tit"><a target="_blank" href="<?php echo site_url('sport/news_show/id/' . $sn['id']); ?> "><?php echo $sn['title']; ?> </a></div> </li> <?php } ?> <?php
$_arr_comment = get_comment_count($val->ID); echo $_arr_comment['approved']; // echo_array(get_comment_count($val->ID)); ?> </span> </div> <?php if (has_post_thumbnail($val->ID)) { ?> <a href="<?php echo wp_get_shortlink($val->ID); ?> "> <div class="article-cover"><img class="img-rounded" src="<?php echo get_img_url($val->ID, array(360, 180)); ?> " width="360"></div> </a> <?php } ?> <?php echo mb_substr(strip_tags($val->post_content), 0, 120, 'utf-8'); ?> </div> <div> <span><i class="glyphicon glyphicon-bookmark"></i> <?php $_arr_cate = get_the_category($val->ID); foreach ($_arr_cate as $val2) {
?> <?php } ?> </div> <div class="bg_f5"> <div class="wp"> <div class="l desti_left"> <?php $this->load->view('place/left'); ?> </div> <div class="r desti_right"> <div class="desti_right_ban"> <img src="<?php echo get_img_url($banner['img'], '828x315', 2); ?> "> </div> <?php $this->load->view('share'); ?> <div class="desti_right_title"> <div class="show_comment"> <div class="destin_w_comment"><a name="comment"></a>写点评<span class="score" style="padding:0px 10px;"></span><span id="function-hint" style="font-size: 25px"></span></div> <?php echo $form; ?> <div class="show_comment_text"> <textarea class="show_comment_area" onKeyUp="javascript:checkWord(this);" onMouseDown="javascript:checkWord(this);" name="comment" placeholder="撰写评论请先登录"></textarea>
<!-- JiaThis Button END --> </div> </div> <div class="hot_news r"> <h3 class="least_news"><em>热门文章</em></h3> <ul> <?php foreach ($latest_news as $ln) { ?> <li class="clear"> <div class="hot_img"><a href="<?php echo site_url('sport/news_show/id/' . $ln['id']); ?> "> <img src="<?php echo get_img_url($ln['img'], '60x60', 10); ?> " alt="<?php echo $ln['title']; ?> "> </a> </div> <div class="hot_title"><a href="<?php echo site_url('sport/news_show/id/' . $ln['id']); ?> "><b><?php echo $ln['title']; ?> </b></a></div> </li>
$this->load->view('share'); ?> <div class="desti_right_title"> <div class="yjgl_ul"> <ul> <?php if ($place_article) { foreach ($place_article as $k => $v) { ?> <li> <div class="yjgl_li_img l"> <a href="<?php echo base_url('place/adetail/id/' . $v['id'] . '/pid/' . $place['pid']); ?> " target="_blank"><img src="<?php echo get_img_url($v['img'], '194x130', 10); ?> "></a> </div> <div class="yjgl_li_txt l"> <div class="yjgl_li_title l" style="margin-left: 0"> <div class="yjgl_li_tit"><a href="<?php echo base_url('place/adetail/id/' . $v['id'] . '/pid/' . $place['pid']); ?> " target="_blank"><?php echo $v['title']; ?> </a></div> <div class="yjgl_li_tit_other"> <span class="yjgl_li_tit_aut">作者:<font><?php echo $v['author'];
</ul> </div> <div class="strategy_all r"> <div class="green_tit">全部宝典</div> <ul class="bj_recommend_ul"> <?php if ($guides) { foreach ($guides as $k => $v) { ?> <li> <div class="bj_thumb"><a href="<?php echo site_url('guide/detail/gid/' . $v['gid']); ?> "><img src="<?php echo get_img_url($v['img'], '140x180', 3); ?> "/></a> </div> <div class="bj_title"><a href="<?php echo site_url('guide/detail/gid/' . $v['gid']); ?> "><?php echo $v['title']; ?> </a></div> <div class="bj_download"><a href="<?php echo site_url('guide/down/gid/' . $v['gid'] . '/url/1'); ?> ">免费下载</a></div> </li>
<div class="destin_line_title"><span><?php echo $y['year']; ?> 年</span></div> <div class="my_photo"> <ul> <?php foreach ($y['mounth'] as $key => $m) { ?> <li> <div class="big_photo"><a class='light_box' href="<?php echo site_url('user/photo_detail/' . $y['year'] . '/' . $m['m'] . '/' . $header_info['uid'] . '?lightbox[iframe]=true&lightbox[width]=1150&lightbox[height]=650'); ?> "> <img src="<?php echo get_img_url($m['filename'], '234x234', 8); ?> ";> </a> </div> <div class="photo_month"><?php echo $m['m'] . '月 共' . $m['num'] . '张 '; ?> </div> </li> <?php } ?> <div class="clear"></div> </ul> </div>
?> 的足迹</div> <?php if ($spaces) { ?> <?php foreach ($spaces as $s) { ?> <div class="spoor-city clear"> <div class="spoor-city-img"> <a href="<?php echo site_url('place/index/pid/' . $s['pid']); ?> "> <img src='<?php echo get_img_url($s['img'], '230x230', 2); ?> ' /> </a> </div> <div class="fn-left"> <div> <a href="<?php echo site_url('place/index/pid/' . $s['pid']); ?> " class="spoor-city-name"><?php echo $s['name']; ?> </a> <?php if (!$space && $space != 'space') {
<a href="<?php echo site_url('user/spoor_city/' . $city['pid'] . '/' . $header_info['uid']); ?> "> <?php } else { ?> <a href="<?php echo site_url('space_spoor_detail/' . $city['pid'] . '/' . $header_info['uid']); ?> "> <?php } ?> <img src="<?php echo get_img_url($city['img'], '230x230', 2); ?> " /></a> </div> <span class="spoor-addr-name"><?php echo $city['name']; ?> </span><span class="spoor-addr-total">去过景点:<?php echo $city['view']; ?> </span> </div> <?php } ?> <?php
function show_slider() { $_int_max_slider = 5; //取得所有文章 $_arr_data = get_posts(array('numberposts' => $_int_max_slider)); foreach ($_arr_data as $key => $val) { $_arr_data[$key] = get_object_vars($val); } $_str_slider = '<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">'; $_str_slider .= '<ol class="carousel-indicators">'; for ($i = 0; $i < $_int_max_slider; ++$i) { if (has_post_thumbnail($_arr_data[$i]['ID'])) { $_str_slider .= '<li data-target="#carousel-example-generic" data-slide-to="' . $i . '" '; if ($i == 0) { $_str_slider .= 'class="active" ></li>'; } else { $_str_slider .= '></li>'; } } } $_str_slider .= '</ol>'; $_str_slider .= '<div class="carousel-inner" role="listbox">'; for ($i = 0; $i < $_int_max_slider; ++$i) { if (has_post_thumbnail($_arr_data[$i]['ID'])) { if ($i == 0) { $_str_slider .= '<div class="item active">'; } else { $_str_slider .= '<div class="item">'; } $_str_slider .= '<a href="' . wp_get_shortlink($_arr_data[$i]['ID']) . '">'; $_str_slider .= '<div class="slider-fill" style="background-image:url(\'' . get_img_url($_arr_data[$i]['ID']) . '\')"></div>'; $_str_slider .= '<div class="carousel-caption">'; $_str_slider .= '<div class="slider-caption">'; $_str_slider .= '<div class="slider-title">' . $_arr_data[$i]['post_title'] . '</div>'; $_str_slider .= '<div class="slider-content">' . mb_substr(strip_tags($_arr_data[$i]['post_content']), 0, 128, 'utf-8') . '...</div>'; $_str_slider .= '</div>'; $_str_slider .= '</div>'; $_str_slider .= '</div>'; $_str_slider .= '</a>'; } } $_str_slider .= '</div>'; $_str_slider .= '<a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">'; $_str_slider .= '<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>'; $_str_slider .= '<span class="sr-only">Previous</span>'; $_str_slider .= '</a>'; $_str_slider .= '<a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">'; $_str_slider .= '<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>'; $_str_slider .= '<span class="sr-only">Next</span>'; $_str_slider .= '</a>'; $_str_slider .= '</div>'; echo $_str_slider; }
public function tags_special_read($array) { $array['logo'] = get_img_url($array['logo']); $array['banner'] = get_img_url($array['banner']); $array['webtitle'] = $array['title'] . '-专题-' . C('web_name'); $array['navtitle'] = '<a href="' . C('web_path') . '">首页</a> > <a href="' . get_show_url('special', '', 1) . '" >专题</a> ><span> ' . $array['title'] . '</span>'; $array['hits'] = get_tag_hits('special', 'hits', $array); $array['monthhits'] = get_tag_hits('special', 'monthhits', $array); $array['weekhits'] = get_tag_hits('special', 'weekhits', $array); $array['dayhits'] = get_tag_hits('special', 'dayhits', $array); $array['inserthits'] = get_tag_hits('special', 'insert', $array); return $array; }
" target="_blank"><?php echo get_color_title(get_replace_html($gxcms['title'], 0, 30), $gxcms['color']); ?> </a> <?php echo get_replace_html($gxcms["intro"], 0, 30); if (!empty($gxcms['picurl'])) { if (get_replace_html($gxcms['picurl'], 0, 7) == 'fail://') { ?> <img src="./views/images/admin/break.jpg" title="图片下载失败"/><?php } else { ?> <a href="javascript:void(0)" onclick="Imgshow('<?php echo get_replace_html($gxcms["title"], 0, 12); ?> ','<?php echo get_img_url($gxcms["picurl"]); ?> ');"><img src="./views/images/admin/pic.jpg" /></a><?php } } ?> <sup id="serial_<?php echo $gxcms["id"]; ?> " title="连载集数"><?php if (!empty($gxcms['serial'])) { echo $gxcms["serial"]; } ?> </sup> </td>
<?php if ($place_city) { foreach ($place_city as $k => $v) { ?> <div class="desti_right_imgbox <?php if ($k % 3 == 2) { echo "mar12"; } ?> l"> <div class="desti_right_imgbox_img"> <a href="<?php echo base_url('place/index/pid/' . $v['pid']); ?> "><img src="<?php echo get_img_url($v['img'], '268x182', 2); ?> "></a> </div> <div class="desti_right_imgbox_txt less_tit"><a href="<?php echo base_url('place/index/pid/' . $v['pid']); ?> "><?php echo $v['name']; ?> </a></div> </div> <?php } } ?>
function get_tag_gxsearch($tag) { $table = !empty($tag['name']) ? trim($tag['name']) : 'video'; $field = !empty($tag['field']) ? trim($tag['field']) : '*'; $limit = !empty($tag['limit']) ? trim($tag['limit']) : '10'; $order = !empty($tag['order']) ? trim($tag['order']) . ' desc' : 'addtime desc'; //从动态配置文件取值; $page = C('bdsearch_page'); $where = C('bdsearch_where'); $rs = M($table); $list = $rs->field($field)->where($where)->limit($limit)->page($page)->order($order)->select(); if (empty($list)) { C($table . 'empty', true); } foreach ($list as $key => $val) { $list[$key]['showname'] = get_channel_name($list[$key]['cid']); $list[$key]['showurl'] = get_show_url($table, array('id' => $list[$key]['cid']), 1); $list[$key]['readurl'] = get_read_url($table, $list[$key]['id'], $list[$key]['cid'], $list[$key]['jumpurl']); $list[$key]['playerurl'] = get_play_url($list[$key]['id'], $list[$key]['cid'], 1); $list[$key]['picurl'] = get_img_url($list[$key]['picurl'], $list[$key]['content']); $list[$key]['picurl-s'] = get_img_url_s($list[$key]['picurl'], $list[$key]['content']); } //dump($rs->getLastSql()); return $list; }
<?php if (array_values($imgs) !== $imgs) { ?> <img src="<?php echo get_img_url($imgs["img"], '725x277', 2); ?> " width="100%"> <?php } else { ?> <div id="slides"> <?php foreach ($imgs as $img) { ?> <img src="<?php echo get_img_url($img["img"], '725x277', 2); ?> "> <?php } ?> <a href="#" class="slidesjs-previous slidesjs-navigation"><i class="icon-chevron-left icon-large"></i></a> <a href="#" class="slidesjs-next slidesjs-navigation"><i class="icon-chevron-right icon-large"></i></a> </div> <?php } ?> </div> <!-- End SlidesJS Required: Start Slides -->