function kmini($f, $w, $h) { $thumb = thumb_name(strrchr_b($f, '/'), $w, $h); if (!is_file($thumb) or $_GET['rebuild_img']) { // make_mini($f, $thumb, $w, $h, 0); } //1 return '<img src="' . $thumb . '">'; }
?> "> 查看全部>> </a> </div> <div class="photo_box" style="<?php if (!$result[$i]->photo) { echo "display:none;"; } ?> "><a href="<?php echo $result[$i]->photo; ?> "> <img src="<?php echo thumb_name($result[$i]->photo, 'small'); ?> " border=0 onload="this.width=Math.min(this.width,100)"/></a></div> <div class="time_pc"><?php echo mb_substr($result[$i]->created_at, 0, 16); ?> </div> </div> </div> <?php } } else { echo "<div style='width:540px; height:100px; line-height:100px; font-size:20px; text-align:center; font-weight:bold;'>对不起!无信息!</div>"; } ?>
} ?> </div> <div id="pic_1"> <?php for ($i = 0; $i < $m_visit; $i++) { ?> <div class="pic_box"> <div class="pic_pg"> <a href="/yard/index.php?id=<?php echo $visit[$i]->f_id; ?> " target="_blank"> <IMG class="pic_img" src="<?php if ($visit[$i]->f_avatar != null) { echo thumb_name($visit[$i]->f_avatar, 'small'); } else { echo '/images/yard_info_img/1.jpg'; } ?> "/> </a> </div> <div class="name_pic"><a title="<?php echo $visit[$i]->f_name; ?> " href="/yard/index.php?id=<?php echo $visit[$i]->f_id; ?> "><?php echo $visit[$i]->f_name;
} if ($nike_name) { $sql .= " and name like '%{$nike_name}%'"; } $db = get_db(); $list = $db->paginate($sql, 3); ?> <div class="friend_result_title">搜索列表</div> <?php if ($list) { foreach ($list as $list) { ?> <div class="friend_result_banner"> <div class="friend_img"> <img src="<?php echo $list->avatar ? thumb_name($list->avatar, 'small') : "/images/yard_info_img/1.jpg"; ?> " /> </div> <div class="friend_nike_name">用户名:<?php echo $list->name; ?> </div> <div class="friend_a"><a href="home.php?id=<?php echo $list->id; ?> ">查看主页</a></div> </div> <?php } } else {
function make_thumb_b($mg, $dir = '') { $xt = substr($mg, -3); $w = 140; $h = 100; list($w, $h) = split('/', prmb(27)); $thumb = thumb_name(str_replace('/', '', $mg), $w, $h); //or filesize($thumb)<2048 if (!file_exists($thumb) or $_GET['rebuild_img']) { make_mini($dir . $mg, $thumb, $w, $h, $_SESSION['rstr'][16]); } return '<img src="' . $thumb . '">'; }
function make_thumb_c($d, $size = '', $s = '') { if (!$size) { $size = prmb(27); } list($w, $h) = split('/', $size); $b = str_replace(array('users/', 'imgb/', 'icons', '/'), '', $d); if (substr($d, 0, 4) != 'http') { $jd = '../'; } //is_dir($d)?'../' $thumb = thumb_name(normalize($b), $w, $h . '-' . $s); if (is_file($d)) { list($wo, $ho, $ty) = getimagesize($d); } if ($wo < $w && $ho < $h) { if (is_file($thumb)) { unlink($thumb); } $thumb = $d; } elseif (!file_exists($thumb) or $_GET['rebuild_img']) { $thumb = make_mini($d, $thumb, $w, $h, $s); } //$jd. return '<img src="' . $jd . $thumb . '?' . randid() . '">'; }
" <?php if ($i == 0) { if ($current_avatar_index == $i) { echo 'style="margin-left:0px; background:url(/images/yard_info_img/pg2.jpg) no-repeat;"'; } else { ?> style='margin-left:0px;' <?php } } if ($current_avatar_index == $i) { echo 'style="background:url(/images/yard_info_img/pg2.jpg) no-repeat;"'; } ?> > <img src="<?php echo $avatars[$i]->photo ? thumb_name($avatars[$i]->photo, 'small') : '/images/yard_info_img/1.jpg'; ?> "/> </div> <?php } ?> </div> </div> <input type="hidden" name="id" value=<?php echo $id; ?> > </form> </div> </div>
function execUnlink() { $this->_getValue(); if ($this->delete_file) { $filename = $this->value; @unlink($this->serverPath($this->upload_root) . "/" . $filename); @unlink($this->serverPath($this->upload_root) . "/" . thumb_name($filename)); } }
</div> <?php $diary_list = $db->query("SELECT * FROM eachbb_member.lastest_news l where u_id={$user_id} order by created_at desc LIMIT 20;"); if (!$diary_list) { if (!$id) { echo '<div style="width:768px; height:500px; margin-left:10px; text-align:center; line-height:200px; float:left; display:inline;"><a href="/yard" style="font-size:26px; font-weight:bold; color:#8A9F9A;">您动态列表为空!</a></div>'; } else { echo '<div style="width:768px; height:500px; margin-left:10px; text-align:center; line-height:200px; float:left; display:inline;"><a href="/yard/diary_list.php" style="font-size:26px; font-weight:bold; color:#8A9F9A;">您好友的动态列表为空!返回!</a></div>'; } } else { foreach ($diary_list as $diary) { ?> <div class="diary_banner"> <div class="diary_title_banner"> <img src="<?php echo thumb_name($diary->u_avatar, 'small'); ?> "/> <div class="diary_title_pg"> <div class="diary_title"><a href="/yard/diary_show.php?edit=<?php echo $diary->id; if ($id) { echo "&id={$id}"; } ?> "><?php if ($id) { echo $member->name; } else { echo '我'; }
function create_thumb($name, $src, $width, $height = null) { $handler = new image_handler_class(); $handler->load(ROOT_DIR_NONE . $src); $handler->setImgCreateQuality(100); $thum_name = ROOT_DIR_NONE . thumb_name($src, $name); $handler->resize_image($thum_name, $width, $height); }
?> "><?php echo $master[$i]->name; ?> </a></div> <div class="al_face"> <a href="/yard/photo_show.php?id=<?php echo $master[$i]->id; ?> &album_id=<?php echo $id; ?> "><img src=" <?php if ($master[$i]->front_cover != null) { echo thumb_name($master[$i]->front_cover, 'small'); } else { echo '/images/yard/noface.jpg'; } ?> " border=0/></a> </div> <div class="al_time">创建日期:<?php echo mb_substr($master[$i]->created_at, 0, 10); ?> </div> <div class="al_words"><?php echo $master[$i]->description; ?> </div> <?php
$user = User::current_user(); $id = $_POST["id"]; if ($id) { $result = $db->query("SELECT * FROM eachbb_member.lastest_news where u_id={$id} and resource_type='diary' order by rand(),created_at desc LIMIT 10"); } else { $result = $db->query("SELECT * FROM eachbb_member.lastest_news where u_id in (SELECT f_id FROM `eachbb_member`.friend where u_id ={$user->id} group by f_id) and resource_type='diary' order by rand(),created_at desc LIMIT 10"); } if ($result) { foreach ($result as $result) { ?> <div class="pc_z"> <div class="pc_pg_img"> <div class="pc_img"><img src=" <?php if ($result->u_avatar) { echo thumb_name($result->u_avatar, 'small'); } else { echo "/images/yard_info_img/1.jpg"; } ?> "/></div> </div> <div class="pc_word"> <div class="title_pc"> <a href="/yard/home.php?id=<?php echo $result->u_id; ?> "> <?php echo $result->u_name; ?>