/** * 获取签证分类标签 * * @version $Id: visatype.lib.php netman * @package Stourweb.Taglib * @copyright Copyright (c) 2007 - 2011, Stourweb, Inc. * @link http://www.stourweb.com */ function lib_visatype(&$ctag, &$refObj) { global $dsql; include SLINEDATA . "/webinfo.php"; $attlist = "typeid|0,row|5,flag|kind,limit|0"; FillAttsDefault($ctag->CAttribute->Items, $attlist); extract($ctag->CAttribute->Items, EXTR_SKIP); $innertext = trim($ctag->GetInnertext()); $revalue = ''; //签证类型 if ($flag == 'kind') { $sql = "select * from #@__visa_kind where isopen=1 order by displayorder asc"; } else { if ($flag == 'city') { $sql = "select * from #@__visa_city order by displayorder asc"; } else { if ($flag == 'country') { $sql = "select * from #@__visa_area where isopen = 1 and pid!=0 order by displayorder asc limit {$limit},{$row}"; } else { if ($flag == 'hotcountry') { $sql = "select * from #@__visa_area where isopen = 1 and pid!=0 and ishot=1 order by displayorder asc limit {$limit},{$row}"; } else { if ($flag == 'getcountrybypid') { $pid = $refObj->Fields['areaid'] ? $refObj->Fields['areaid'] : 0; if (empty($pid)) { exit; } $sql = "select * from #@__visa_area where isopen = 1 and pid='{$pid}' order by displayorder,pinyin asc limit {$limit},{$row}"; } } } } } $dsql->SetQuery($sql); $dsql->Execute(); $ctp = new STTagParse(); $ctp->SetNameSpace("field", "[", "]"); $ctp->LoadSource($innertext); $GLOBALS['autoindex'] = 0; while ($row = $dsql->GetArray()) { $GLOBALS['autoindex']++; $row['title'] = $row['kindname']; $row['litpic'] = isset($row['litpic']) ? $row['litpic'] : getDefaultImage(); foreach ($ctp->CTags as $tagid => $ctag) { if ($ctag->GetName() == 'array') { $ctp->Assign($tagid, $row); } else { if (!empty($row[$ctag->GetName()])) { $ctp->Assign($tagid, $row[$ctag->GetName()]); } else { $ctp->Assign($tagid, ''); } } } $revalue .= $ctp->GetResult(); } return $revalue; }
function getRecSpots_standard($lineid, $webid) { global $dsql; $weburl = GetWebURLByWebid($webid); //获取站点url $str = "<div class=\"piclist\"> <ul class=\"pic-ul\">"; $sql = "select title,litpic,spotid from #@__line_spot where lineid='{$lineid}' and webid=0 order by displayorder asc"; $res = $dsql->getAll($sql); $numberrow = count($res); if (empty($res)) { return ''; } $idx = 0; foreach ($res as $row) { $row['litpic'] = !empty($row['litpic']) ? $row['litpic'] : getDefaultImage(); $str .= "<li><a class=\"imgGroup\" href=\"{$weburl}/spots/show_{$row['spotid']}.html\"><img width=\"125\" height=\"135\" src=\"{$row['litpic']}\"></a><p>{$row['title']}</p></li>"; } $str .= "</ul></div>"; return $str; }
$aid = RemoveXSS($aid); //防止跨站攻击 $sql = "select * from #@__line where webid=0 and aid={$aid}"; $row = $dsql->GetOne($sql); if (empty($row[id])) { head404(); } if (is_array($row)) { if (!empty($row['storeprice']) || $row['storeprice'] > $row['price']) { $row['cheap'] = $row['storeprice'] - $row['price']; } else { $row['cheap'] = 0; } $row['price'] = !empty($row['price']) ? "<span class=\"rmb_1\">¥</span>" . $row['price'] . "</span>" : "电询</span>"; $row['storeprice'] = !empty($row['storeprice']) ? $row['storeprice'] . "</span>" : "无</span>"; $row['litpic'] = empty($row['litpic']) ? getDefaultImage() : $row['litpic']; $row['description'] = !empty($row['description']) ? "<meta name=\"description\" content=\"" . $row['description'] . "\"/>" : ""; $row['keywords'] = !empty($row['keyword']) ? "<meta name=\"keywords\" content=\"" . $row['keyword'] . "\"/>" : ""; $row['subname'] = $row['title']; $row['id'] = strlen($row['id']) == 1 ? "0" . $row['id'] : $row['id']; $row['seotitle'] = !empty($row['seotitle']) ? $row['seotitle'] : $row['title']; $row['startplacename'] = getStartCityName($row['startcity']); foreach ($row as $k => $v) { $pv->Fields[$k] = $v; } //print_r($this->Fields); } $pv->Fields['title'] = !empty($row['seotitle']) ? $row['seotitle'] : $row['title']; $linecontent = getLineContentPrint($row, 1); //线路介绍分类 $typename = GetTypeName($typeid);
/** */ public function next() { $type = 'news'; $pagination = $this->input->post('page', TRUE); $ulclass = $this->input->post('ulclass', TRUE); if (isset($ulclass) && $ulclass == 'true') { $sponserList = 'style="display:none"'; $description = 'style="display:block"'; } else { $sponserList = 'style="display:block"'; $description = 'style="display:none"'; } if (isset($pagination) && $pagination != '') { $next_set = $pagination; } else { $next_set = $this->uri->segment(3) ? $this->uri->segment(3) : 0; } $count = $this->feedModel->getAllDataCount($type); $config = array(); $config["base_url"] = base_url() . "home/next"; $config["total_rows"] = $count; $config["per_page"] = 22; $config['use_page_numbers'] = true; $config["uri_segment"] = 3; $config['num_links'] = '10'; $config['last_link'] = ''; $this->pagination->initialize($config); $page = $next_set; $limit = $config["per_page"]; $offset = $limit * ($page - 1); $feeds_list = $this->getAllData($limit, $offset, $type); $pagination_links = $this->pagination->create_links(); $postsdata = ''; $countForAd = 1; if (!empty($feeds_list)) { $default_image = getDefaultImage(); $default_url = 'javascript:void(0)'; foreach ($feeds_list as $feed) { $feed_url = isset($feed->feed_url) ? $feed->feed_url : $default_url; $feed_title = isset($feed->feed_title) ? $feed->feed_title : 'title'; // Get the title $feed_image_title = isset($feed->feed_user_title) ? $feed->feed_user_title : 'Admin'; $feed_title_truncated = substr($feed_image_title, 0, 40); $alt_image = isset($feed->feed_image_title) ? $feed->feed_image_title : ''; // Feed content to remove the html tags and get the first image $html = $feed->feed_content; preg_match_all('/<img[^>]+>/i', $html, $result); $feed_image = $result; $date = isset($feed->feed_date) ? $feed->feed_date : date('Y-m-d'); $feed_image = isset($feed_image[0][0]) ? $feed_image[0][0] : $default_image; // $avater = isset($feed->feed_image_urls) ? $feed->feed_image_urls : site_url('assets/img/avatar.jpg'); $avatar = feedIconByUrl($feed->feed_admin_url); if (!empty($avatar)) { $favicon = site_url() . 'uploads/feed/' . $avatar; } else { $favicon = site_url('assets/img/avatar.jpg'); } $postsdata .= '<li>'; $postsdata .= '<div class="item video clear_fix">'; $postsdata .= '<div class="img fl_left">'; $postsdata .= '<a href="' . site_url() . 'feeds/preview/' . $feed->feed_content_hash . '">'; if (file_exists($feed_image)) { $feed_image; } else { $default_image; } $postsdata .= '</a>'; $postsdata .= '</div>'; $postsdata .= '<div class="info">'; $postsdata .= '<div class="name">'; $postsdata .= '<a href="' . site_url() . 'feeds/preview/' . $feed->feed_content_hash . '">' . $feed->feed_title . '</a>'; $postsdata .= '</div>'; $postsdata .= '<div class = "text">' . strip_tags(substr($html, 0, 800)) . '</div>'; $postsdata .= '<div class="bottom table clear_fix">'; $postsdata .= ' <div class="author clear_fix">'; $postsdata .= '<div class="author_img fl_left">'; $postsdata .= '<a href="#">'; $postsdata .= '<img alt="Ashley Clements" src="' . site_url() . '/assets/img/avatar.jpg' . '">'; $postsdata .= '</a>'; $postsdata .= '</div>'; $postsdata .= '<div>'; $postsdata .= '<div class="author_name">'; $postsdata .= '<a href="#">' . $feed_title . '</a>'; $postsdata .= '</div>'; $postsdata .= '<div class="date">' . nicetime($date) . '</div>'; $postsdata .= '</div>'; $postsdata .= '</div>'; $postsdata .= '<div class="icon">'; $postsdata .= '<a href="#"></a>'; $postsdata .= '</div>'; $postsdata .= '</div>'; $postsdata .= '</div>'; $postsdata .= '</div>'; $postsdata .= '</li>'; $countForAd++; } echo $postsdata; return; } else { return; } }
/** */ public function next() { $type = 'picture'; $pagination = $this->input->post('page', TRUE); $ulclass = $this->input->post('ulclass', TRUE); if (isset($ulclass) && $ulclass == 'true') { $sponserList = 'style="display:none"'; $description = 'style="display:block"'; } else { $sponserList = 'style="display:block"'; $description = 'style="display:none"'; } if (isset($pagination) && $pagination != '') { $next_set = $pagination; } else { $next_set = $this->uri->segment(3) ? $this->uri->segment(3) : 0; } $count = $this->feedModel->getAllDataCount($type); $config = array(); $config["base_url"] = base_url() . "home/next"; $config["total_rows"] = $count; $config["per_page"] = 22; $config['use_page_numbers'] = true; $config["uri_segment"] = 3; $config['num_links'] = '10'; $config['last_link'] = ''; $this->pagination->initialize($config); $page = $next_set; $limit = $config["per_page"]; $offset = $limit * ($page - 1); $feeds_list = $this->getAllData($limit, $offset, $type); $pagination_links = $this->pagination->create_links(); $postsdata = ''; $countForAd = 1; if (!empty($feeds_list)) { $default_image = getDefaultImage(); $default_url = 'javascript:void(0)'; foreach ($feeds_list as $feed) { $feed_url = isset($feed->feed_url) ? $feed->feed_url : $default_url; $feed_title = isset($feed->feed_title) ? $feed->feed_title : 'title'; // Get the title $feed_image_title = isset($feed->feed_user_title) ? $feed->feed_user_title : 'Admin'; $feed_title_truncated = substr($feed_image_title, 0, 40); $alt_image = isset($feed->feed_image_title) ? $feed->feed_image_title : ''; // Feed content to remove the html tags and get the first image $html = $feed->feed_content; preg_match_all('/<img[^>]+>/i', $html, $result); $feed_image = $result; $date = isset($feed->feed_date) ? $feed->feed_date : date('Y-m-d'); $feed_image = isset($feed_image[0][0]) ? $feed_image[0][0] : $default_image; // $avater = isset($feed->feed_image_urls) ? $feed->feed_image_urls : site_url('assets/img/avatar.jpg'); $avatar = feedIconByUrl($feed->feed_admin_url); if (!empty($avatar)) { $favicon = site_url() . 'uploads/feed/' . $avatar; } else { $favicon = site_url('assets/img/avatar.jpg'); } if ($countForAd == 4) { $postsdata .= '<li class="sponserList"' . $sponserList . '>'; $postsdata .= '<div class="item sponsor">'; $postsdata .= '<div class="img">'; $postsdata .= '<a href="javascript:void(0)">' . sidebarAd() . '</a>'; $postsdata .= '</div>'; $postsdata .= '<div class="ads text_center">'; $postsdata .= '<a href="javascript:void(0)">SPONSOR ADS</a>'; $postsdata .= '</div>'; $postsdata .= '</div>'; $postsdata .= '</li>'; } if ($countForAd == 13) { $postsdata .= '<li class="sponserList"' . $sponserList . '>'; $postsdata .= '<div class="small_height">'; $postsdata .= '<div class="item">'; $postsdata .= '<div class="img_class">'; $postsdata .= '<a href="javascript:void(0)">' . pageinsideAd() . '</a>'; $postsdata .= '</div>'; $postsdata .= '</div>'; $postsdata .= '</div>'; $postsdata .= '<div class="small_height">'; $postsdata .= '<div class="item">'; $postsdata .= '<div class="img_class">'; $postsdata .= '<a href="javascript:void(0)">' . pageinsideTwo() . '</a>'; $postsdata .= '</div>'; $postsdata .= '</div>'; $postsdata .= '</div>'; $postsdata .= '</li>'; } $postsdata .= '<li>'; $postsdata .= '<div class="item">'; $postsdata .= '<div class="img getImage">'; $postsdata .= '<a href ="' . $feed_url . '">' . $feed_image . '</a>'; $postsdata .= ' </div>'; $postsdata .= '<div class="rightSide">'; $postsdata .= '<div class="name">'; $postsdata .= '<a href="' . $feed_url . '">' . $feed_title . '</a>'; $postsdata .= '</div>'; $postsdata .= '<div class="description textStyle" ' . $description . '>' . strip_tags(substr($html, 0, 800)) . '</div>'; $postsdata .= '</div>'; $postsdata .= '<div class="bottom table wd100_wd clear_fix">'; $postsdata .= '<div class="author wd80_wd clear_fix">'; $postsdata .= '<div class="author_img fl_left">'; $postsdata .= '<a href="' . $feed_url . '">'; $postsdata .= '<img class="avatar_class" src = "' . $favicon . '" alt = "' . $alt_image . '">'; $postsdata .= '</a>'; $postsdata .= '</div>'; $postsdata .= '<div>'; $postsdata .= '<div class="author_name">'; $postsdata .= '<a href="' . $default_url . '">' . $feed_title_truncated . '</a>'; $postsdata .= '</div>'; $postsdata .= '<div class="date">' . date("d-M-y", strtotime($date)) . '</div>'; $postsdata .= '</div>'; $postsdata .= ' </div>'; $postsdata .= '<div class="main_content_share_button wd20_wd" style=""> <script type="text/javascript">var switchTo5x = true;</script> <script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script> <script type="text/javascript">stLight.options({publisher: "d661bce1-3df6-41f2-a167-27cb74203fc1", doNotHash: false, doNotCopy: false, hashAddressBar: false});</script> <div id="slideToggleParent_' . $feed->id . '" class="main_content_share" style="display: none"> <span class="st_facebook_large" displayText="Facebook"></span> <span class="st_twitter_large" displayText="Tweet"></span> <span class="st_email_large" displayText="Email"></span> <span class="st_plusone_large" displayText="Google +1"></span> </div> <div id="slideToggle_' . $feed->id . '" onclick="javascript:getShareDiv(' . $feed->id . ')" class="icon slideToggle"> <a href="javascript:void(0)"></a> </div> </div>'; $postsdata .= '</div>'; $postsdata .= '</li>'; $countForAd++; } echo $postsdata; return; } else { return; } }
/** * 调用相册显示数据标签 * * @version $Id: getphotolist.lib.php netman * @package Stourweb.Taglib * @copyright Copyright (c) 2007 - 2011, Stourweb, Inc. * @link http://www.stourweb.com */ function lib_getphotolist(&$ctag, &$refObj) { global $dsql, $cfg_indexphoto; include SLINEDATA . "/webinfo.php"; $attlist = "row|10,flag|,type|top,limit|0"; FillAttsDefault($ctag->CAttribute->Items, $attlist); extract($ctag->CAttribute->Items, EXTR_SKIP); $innertext = trim($ctag->GetInnertext()); $basefield = 'a.aid,a.title,a.seotitle,a.litpic,a.content,a.title as littitle,a.alt,a.author,a.shownum,a.webid,a.headimgid'; $revalue = ''; //加目的地页面显示条件 $destwhere = isset($refObj->Fields['kindid']) ? "and FIND_IN_SET({$refObj->Fields['kindid']},kindlist) " : ''; //用于聚合页面 if ($type == 'mdd') { if (isset($refObj->Fields['kindid'])) { $sonid = $refObj->Fields['kindid']; $number = isset($refObj->Fields['shownumber']) ? $refObj->Fields['shownumber'] : $row; //如果模块设置了显示数量则使用. $sql = "select {$basefield} from #@__photo as a left join #@__kindorderlist as c on (c.classid={$sonid} and a.id=c.aid and c.typeid=6) where FIND_IN_SET({$sonid},a.kindlist) order by c.isding desc,case when c.displayorder is null then 9999 end,c.displayorder asc,a.addtime desc limit {$limit},{$number}"; } else { return ''; } } else { if ($type == 'sonhot') { if (isset($refObj->Fields['kindid'])) { $sonid = $refObj->Fields['kindid']; $sql = "select {$basefield} from #@__photo a where FIND_IN_SET({$sonid},kindlist) order by shownum desc limit {$limit},{$row}"; } else { return ''; } } else { if ($type == 'attr') { if (isset($attrid)) { $sql = "select {$basefield} from #@__photo a where FIND_IN_SET({$attrid},attrid) order by displayorder asc,shownum desc limit {$limit},{$row}"; } else { return ''; } } else { if ($type == 'relative') { $kindlist = $refObj->Fields['kindlist']; $maxkindid = array_remove_value($kindlist); //最后一级. $where = " FIND_IN_SET({$maxkindid},kindlist) "; $sql = "select {$basefield} from #@__photo a where {$where} order by modtime desc,addtime desc limit {$limit},{$row}"; } else { if ($type == 'sonj') { if (isset($refObj->Fields['sonid'])) { $sonid = $refObj->Fields['sonid']; $sql = "select aid,title,seoname,headimg,content,title as littitle,alt,author,shownum,webid,headimgid from #@__photo where webid!='' {$destwhere} and photokind={$sonid} order by modtime desc,addtime desc limit {$limit},{$row}"; } else { return ''; } } else { if ($flag == 'recommend') { $sql = "select {$basefield} ,b.isjian,b.isding ,b.displayorder from #@__photo a left join #@__allorderlist b on(a.id=b.aid and b.typeid=6) order by case when b.displayorder is null then 9999 end,b.displayorder asc,a.modtime desc,a.addtime desc limit {$limit},{$row}"; } else { if ($flag == 'isding') { $sql = "select {$basefield} from #@__photo where webid={$sys_webid} and isding=1 order by addtime desc limit {$limit},{$row}"; } else { if ($flag == 'roll') { //首页相册显示方式 if ($GLOBALS['cfg_indexphoto'] == "0") { $sql = "select {$basefield} from #@__photo where webid={$sys_webid} order by modtime desc,addtime desc"; } else { if ($GLOBALS['cfg_indexphoto'] == "-1") { $sql = "select id,pictname as photoname,litpic as headimg,pid as aid from #@__photo_picture where webid={$sys_webid} order by modtime desc"; } else { $sql = "select id,pictname as photoname,litpic as headimg,pid as aid from #@__photo_picture where webid={$sys_webid} and pid={$GLOBALS['cfg_indexphoto']} order by modtime desc"; } } } else { return ''; } } } } } } } } $dsql->SetQuery($sql); $dsql->Execute(); $ctp = new STTagParse(); $ctp->SetNameSpace("field", "[", "]"); $ctp->LoadSource($innertext); $GLOBALS['autoindex'] = 0; while ($row = $dsql->GetArray()) { $GLOBALS['autoindex']++; $weburl = GetWebURLByWebid($row['webid']); $row['url'] = $weburl . "/photos/show_{$row['aid']}.html"; $row['title'] = !empty($row['seotitle']) ? $row['seotitle'] : $row['photoname']; $row['litpic'] = !empty($row['litpic']) ? $row['litpic'] : getDefaultImage(); $row['lit240'] = getPicByName($row['litpic'], 'lit240'); $row['lit160'] = getPicByName($row['litpic'], 'lit160'); $row['alt'] = !empty($row['alt']) ? $row['alt'] : $row['photoname']; /*if($row['littitle']!="") { $row['imgtitle']="title='".$row['littitle']."'"; }*/ //$row['headimg']=!empty($row['headimg'])?$row['headimg']:"sdfsf"; foreach ($ctp->CTags as $tagid => $ctag) { if ($ctag->GetName() == 'array') { $ctp->Assign($tagid, $row); } else { if (!empty($row[$ctag->GetName()])) { $ctp->Assign($tagid, $row[$ctag->GetName()]); } } } $revalue .= $ctp->GetResult(); } return $revalue; }
</a> </li> </ul> </div> </div> </div> <div class="items container clear_fix"> <?php pri($feeds_list); die; ?> <ul class="clear_fix items_list" id="feed_content" style="position: relative;"> <?php $default_image = getDefaultImage(); $count = 1; if (!empty($feeds_list)) { foreach ($feeds_list as $feed) { $html = $feed->feed_content; preg_match_all('/<img[^>]+>/i', $html, $result); $feed_image = $result; $date = isset($feed->feed_date) ? $feed->feed_date : date('Y-m-d'); $feed_image = isset($feed_image[0][0]) ? $feed_image[0][0] : $default_image; $feed_title_title = isset($feed->feed_user_title) ? $feed->feed_user_title : ''; $feed_title = substr($feed_title_title, 0, 40); $avatar = feedIconByUrl($feed->feed_admin_url); if (!empty($avatar)) { $favicon = site_url() . $avatar; } else { $favicon = site_url('assets/img/avatar.jpg');
updateVisit($aid, $typeid); //更新访问次数 $row = getArticleInfo($aid); if (empty($row['id'])) { head404(); } if (!empty($row['redirecturl'])) { head301($row['redirecturl']); } $prenext = GetPreNext($aid); //获取上一条,下一条 foreach ($prenext as $k => $v) { $pv->Fields[$k] = $v; } if (is_array($row)) { $row['litpic'] = !empty($row['litpic']) ? $row['litpic'] : getDefaultImage(); $row['taglook'] = GetTagsLink($row['tagword']); $row['description'] = !empty($row['description']) ? "<meta name=\"description\" content=\"" . $row['description'] . "\"/>" : ""; $row['keyword'] = !empty($row['keyword']) ? "<meta name=\"keywords\" content=\"" . $row['keyword'] . "\"/>" : ""; $row['subname'] = $row['title']; $row['commentnum'] = Helper_Archive::getCommentNum($row['id'], 4); $row['commenthomeid'] = $row['id']; $row['id'] = strlen($row['id']) == 1 ? "0" . $row['id'] : $row['id']; $row['pkname'] = get_par_value($row['kindlist'], $typeid); $row['yesjian'] = is_null($row['yesjian']) ? 0 : $row['yesjian']; $row['destid'] = array_remove_value($row['kindlist']); $row['pinyin'] = Helper_Archive::getDestPinyin($row['destid']); $row['destname'] = !empty($row['destid']) ? '[<a href="/raiders/' . $row['pinyin'] . '">' . Helper_Archive::getBelongDestName($row['kindlist']) . '</a>]' : ''; //所属目的地 $row['destarcnum'] = getArticleNum($row['destid']); $row['attrlist'] = getArticleAttrlist($row['attrid']);
function getLitpic($litpic) { return empty($litpic) ? getDefaultImage() : $litpic; }
function getPiclistArr($kindid, $width, $height) { global $dsql; $flag = 0; $sql = "select litpic,piclist from #@__destinations where id={$kindid}"; $row = $dsql->GetOne($sql); if (empty($row['litpic']) && empty($row['piclist'])) { $df_big = getDefaultImage(); $out = "<img src=\"{$df_big}\" width='{$width}' height='{$height}'/>"; } else { if (!empty($row['litpic']) && empty($row['piclist'])) { $temp_arr = explode('||', str_replace('litimg', 'allimg', $row['litpic'])); $out = "<img src=\"{$temp_arr[0]}\" width='{$width}' height='{$height}' title='{$temp_arr[1]}'/>"; } } if (!empty($row['piclist'])) { $picarr = explode(',', $row['piclist']); foreach ($picarr as $key => $value) { $temp_arr = explode('||', $value); $pic = str_replace('litimg', 'allimg', $temp_arr[0]); $out .= "<img src=\"{$pic}\" width='{$width}' height='{$height}' title='{$temp_arr[1]}' />"; } } return $out; }
$row['destid'] = array_remove_value($row['kindlist']); $row['pinyin'] = Helper_Archive::getDestPinyin($row['destid']); $row['kindid'] = $row['destid']; //是否设置了目的地条件,便于展示推荐线路 if (!empty($row['destid'])) { $GLOBALS['condition']['_hasdest'] = 1; } foreach ($row as $k => $v) { $pv->Fields[$k] = $v; } } $pv->Fields['typeid'] = $typeid; $pv->Fields['modulename'] = $module_name; $pv->Fields['modulepinyin'] = $module_pinyin; $piclist = TongYong::handlePicture($row['piclist']); $firstpic = isset($piclist) ? array($piclist[0]) : array('litpic' => getDefaultImage(), 'desc' => $row['title']); unset($piclist[0]); //获取上级开启了导航的目的地 getTopNavDest($row['kindlist']); $typename = GetTypeName($typeid); //获取栏目名称. $pv->Fields['typename'] = $typename; $pv->Fields['title'] = !empty($row['seotitle']) ? $row['seotitle'] : $row['title']; $pv->Fields['addtime'] = empty($row['modtime']) ? $row['addtime'] : $row['modtime']; //兼容win linux $filename = str_replace("\\", '/', dirname(__FILE__)); //获取当前文件夹名 $filename = explode("/", $filename); $key = count($filename) - 1; $url = $filename[$key] . "_show"; $templet = Helper_Archive::getUseTemplet($url);
$countryinfo = getNationInfo($countrypy); $where .= " and nationid='{$countryinfo['id']}'"; //签证城市条件 if (!empty($cityid)) { $where .= " and cityid='{$cityid}'"; } $sql = "select a.* from #@__visa a left join #@__allorderlist b on (a.id=b.aid and b.typeid={$typeid} and a.webid=b.webid) where a.ishidden=0 {$where} order by case when b.displayorder is null then 9999 end,b.displayorder asc,a.modtime desc,a.addtime desc"; $seoarr = array(); //seo信息数组 $seoarr['typename'] = GetTypeName($typeid); $seoarr['pageno'] = !empty($pageno) ? '第' . $pageno . '页-' : ""; $seoarr['seotitle'] = $countryinfo['seotitle'] ? $countryinfo['seotitle'] : $countryinfo['kindname']; $seoarr['seodescription'] = !empty($countryinfo['description']) ? "<meta name=\"description\" content=\"" . $countryinfo['description'] . "\"/>" : ""; $seoarr['seokeyword'] = !empty($countryinfo['keyword']) ? "<meta name=\"keywords\" content=\"" . $countryinfo['keyword'] . "\"/>" : ""; $seoarr['jieshao'] = $countryinfo['jieshao']; $seoarr['litpic_guoqi'] = $countryinfo['countrypic'] ? $countryinfo['countrypic'] : getDefaultImage(); $seoarr['bigpic'] = $countryinfo['bigpic'] ? $countryinfo['bigpic'] : '/templets/smore/images/guojia_bg.jpg'; $seoarr['countryname'] = $countryinfo['kindname']; $pv = new ListView($typeid); $pv->pagesize = 8; //分页条数. $pv->SetSql($sql); //seo变量赋值 foreach ($seoarr as $k => $v) { $pv->Fields[$k] = $v; } $pv->SetParameter('countrypy', $countrypy); $pv->SetParameter('cityid', $cityid); //模板选择 $templet = Helper_Archive::getUseTemplet('visa_list'); //获取使用模板
/** */ public function next() { $count = $this->feedModel->getAllDataCount(); $config = array(); $config["base_url"] = base_url() . "home/next"; $config["total_rows"] = $count; $config["per_page"] = 22; $config['use_page_numbers'] = true; $config["uri_segment"] = 3; $config['num_links'] = '10'; $config['full_tag_open'] = '<ul class="paginatepag1 mr0" style="margin-left:35%">'; $config['full_tag_close'] = '</ul></div>'; $config['num_tag_open'] = '<li>'; $config['num_tag_close'] = '</li>'; $config['cur_tag_open'] = '<li class="active"><a>'; $config['cur_tag_close'] = '</a></li>'; $config['prev_tag_open'] = '<li>'; $config['prev_tag_close'] = '</li>'; $config['next_tag_open'] = '<li>'; $config['next_tag_close'] = '</li>'; $config['first_link'] = '<li>FIRST</li>'; $config['last_link'] = ''; $this->pagination->initialize($config); $page = $this->uri->segment(3) ? $this->uri->segment(3) : 0; $limit = $config["per_page"]; $offset = $limit * ($page - 1); $feeds_list = $this->getAllData($limit, $offset); $pagination_links = $this->pagination->create_links(); $postsdata = ''; if (!empty($feeds_list)) { $default_image = getDefaultImage(); $default_url = 'javascript:void(0)'; foreach ($feeds_list as $feed) { $feed_url = isset($feed->feed_url) ? $feed->feed_url : $default_url; $feed_title = isset($feed->feed_title) ? $feed->feed_title : 'title'; $feed_image_title = isset($feed->feed_image_title) ? $feed->feed_image_title : 'Admin'; $alt_image = isset($feed->feed_image_title) ? $feed->feed_image_title : ''; $html = $feed->feed_content; preg_match_all('/<img[^>]+>/i', $html, $result); $feed_image = $result; $date = isset($feed->feed_date) ? $feed->feed_date : date('Y-m-d'); $feed_image = isset($feed_image[0][0]) ? $feed_image[0][0] : $default_image; $avater = isset($feed->feed_image_urls) ? $feed->feed_image_urls : site_url('assets/img/avatar.jpg'); $postsdata .= '<li style="position:absolute">'; $postsdata .= '<div class="item">'; $postsdata .= '<div class="img">'; $postsdata .= '<a href ="' . $feed_url . '">' . $feed_image . '</a>'; $postsdata .= ' </div>'; $postsdata .= '<div class="name">'; $postsdata .= '<a href="' . $feed_url . '">' . $feed_title . '</a>'; $postsdata .= '</div>'; $postsdata .= '<div class="bottom table clear_fix">'; $postsdata .= '<div class="author clear_fix">'; $postsdata .= '<div class="author_img fl_left">'; $postsdata .= '<a href="' . $feed_url . '">'; $postsdata .= '<img class="avatar_class" src = "' . $avater . '" alt = "' . $alt_image . '">'; $postsdata .= '</a>'; $postsdata .= '</div>'; $postsdata .= '<div>'; $postsdata .= '<div class="author_name">'; $postsdata .= '<a href="' . $default_url . '">' . $feed_image_title . '</a>'; $postsdata .= '</div>'; $postsdata .= '<div class="date">' . date("d-M-y", strtotime($date)) . '</div>'; $postsdata .= '</div>'; $postsdata .= ' </div>'; $postsdata .= '<div class = "icon"><a href="' . $default_url . '"></a></div>'; $postsdata .= '</div>'; $postsdata .= '</div>'; $postsdata .= '</li >'; } echo $postsdata; return; } else { echo '<li class="items nothing_found" id="nothing_found" style="width:100%;text-align:center;float:left">No more feed results!</li>'; return; } }
function getPiclistArrZ($kindid, $bigtemp = '<img src="{src}" width="725" height="304"/>', $replacetemp = '{src}') { global $dsql; $flag = 0; $sql = "select litpic,piclist from #@__destinations where id={$kindid}"; $row = $dsql->GetOne($sql); if (empty($row['litpic']) && empty($row['piclist'])) { $df_big = getDefaultImage(); $out = str_replace($replacetemp, $df_big, $bigtemp); } else { if (!empty($row['litpic']) && empty($row['piclist'])) { $temp_arr = explode('||', str_replace('litimg', 'allimg', $row['litpic'])); $out = str_replace($replacetemp, $temp_arr[0], $bigtemp); } } if (!empty($row['piclist'])) { $picarr = explode(',', $row['piclist']); foreach ($picarr as $key => $value) { $temp_arr = explode('||', $value); $pic = str_replace('litimg', 'allimg', $temp_arr[0]); $out .= str_replace($replacetemp, $pic, $bigtemp); } } return $out; }
public static function getLitpic($id, $typeid) { $row = self::getProductInfo($id, $typeid); return $row['litpic'] ? $row['litpic'] : getDefaultImage(); }