コード例 #1
0
/**
 * 云搜索调用标签(废弃)
 *
 * @version        $Id: cloudsearch.lib.php netman
 * @package        Stourweb.Taglib
 * @copyright      Copyright (c) 2007 - 2011, Stourweb, Inc.
 * @link           http://www.stourweb.com
 */
function lib_cloudsearch(&$ctag, &$refObj)
{
    global $dsql;
    $attlist = "row|20,";
    FillAttsDefault($ctag->CAttribute->Items, $attlist);
    extract($ctag->CAttribute->Items, EXTR_SKIP);
    $innertext = trim($ctag->GetInnertext());
    $ResultList = isset($refObj->Fields['ResultList']) ? $refObj->Fields['ResultList'] : '';
    $keyword = $refObj->Fields['keyword'];
    //print_r($ResultList);
    $ctp = new STTagParse();
    $ctp->SetNameSpace("field", "[", "]");
    $ctp->LoadSource($innertext);
    $GLOBALS['autoindex'] = 0;
    for ($i = 0; isset($ResultList[$i]); $i++) {
        $GLOBALS['autoindex']++;
        $row = $ResultList[$i];
        $row['description'] = setColor($keyword, cutstr_html($row['content'], 90));
        $row['channelname'] = getChannelName($row['tablename']);
        $row['title'] = setColor($keyword, $row['title']);
        $row['litpic'] = getLitpic($row['imgurl'], $row['webid'], $row);
        $row['website'] = GetWebURLByWebid($row['webid']);
        $row['weburl'] = $row['website'];
        $row['url'] = getUrl($row['aid'], $row['webid'], $row['tablename'], $row['tag']);
        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;
}
コード例 #2
0
ファイル: line.func.php プロジェクト: lz1988/stourwebcms
function getDaySpot($day, $lineid, $webid = 0)
{
    global $dsql;
    $sql = "select * from #@__line_dayspot where day = '{$day}' and lineid='{$lineid}'";
    $arr = $dsql->getAll($sql);
    foreach ($arr as $row) {
        $spotinfo = getInfo('#@__spot', "where id='{$row['spotid']}' ", 'aid,content,piclist,litpic,title,webid');
        $description = cutstr_html(strip_tags($spotinfo['content']), 200);
        //景点描述
        $spotpic = getSpotPic($spotinfo, $row['spotid'], $webid);
        $out .= ' <div class="spot_top">
                    <div class="spot_bg_pic"></div>
                    <h3>' . $row['title'] . '</h3>
                  </div>
                  <div class="spot_num">
                  	<div class="spot_p">
                    	<p>' . $description . '</p>
                    </div>
                    <ul class="spot_img">' . $spotpic . '
                    </ul>
                  </div>';
    }
    return $out;
}
コード例 #3
0
ファイル: print.php プロジェクト: lz1988/stourwebcms
function getDaySpotPrint($day, $lineid, $webid)
{
    global $dsql;
    $sql = "select * from #@__line_dayspot where day = '{$day}' and lineid='{$lineid}' and webid='{$webid}'";
    $arr = $dsql->getAll($sql);
    foreach ($arr as $row) {
        $spotinfo = getInfo('#@__spot', "where id='{$row['spotid']}' ", 'aid,content,piclist,litpic,title,webid');
        $description = cutstr_html(strip_tags($spotinfo['content']), 200);
        //景点描述
        $spotpic = getSpotPicPrint($spotinfo, $row['spotid'], $webid);
        $out .= '<div class="jingdian">
          	<span class="tit">游玩景点 :' . $row['title'] . '</span>
            <div class="jd_con">
            	' . $description . '
            </div>
            <ul class="jd_ul">' . $spotpic . '</ul>

          </div>';
    }
    return $out;
}
コード例 #4
0
ファイル: ajax.line.php プロジェクト: lz1988/stourwebcms
    }
    $out['monthli'] = $monthli;
    $out['jifen'] = $jifenarr;
    echo json_encode($out);
    exit;
}
//获取行程景点信息,暂用于百度地图信息
if ($dopost == 'getdayspots') {
    $sql = "select * from #@__line_dayspot where lineid='{$lineid}'";
    $arr = $dsql->getAll($sql);
    $out = array();
    foreach ($arr as $key => $row) {
        $spotinfo = getInfo('#@__spot', "where id='{$row['spotid']}' ", 'id,aid,content,litpic,title,lng,lat');
        $spotpic = getUploadFileUrl($spotinfo['litpic']);
        $linkurl = "/spots/show_" . $spotinfo['aid'] . ".html";
        $description = cutstr_html(strip_tags($spotinfo['content']), 100);
        //景点描述
        $outstr = "<div style='width:300px;'>";
        $outstr .= "<h4 style='margin:0 0 5px 0;padding:0.2em 0'><a href='" . $linkurl . "' target='_blank'>" . $spotinfo['title'] . "</a></h4>";
        $outstr .= "<img style='float:right;margin:4px' id='imgDemo' src='" . $spotpic . "' width='139' height='104' title='" . $spotinfo['title'] . "'/>";
        $outstr .= "<p style='margin:0;line-height:1.5;font-size:13px;text-indent:2em'>" . $description . "<a href='" . $linkurl . "' target='_blank'>[<font color='#01aec8'>查看详情</font>]</a></p>";
        $outstr .= "</div>";
        $out[$key][] = $spotinfo['lng'];
        $out[$key][] = $spotinfo['lat'];
        $out[$key][] = $outstr;
    }
    echo json_encode($out);
    exit;
}
//获取套餐适用人群与优惠
function getPeopleGroup($suitid)
コード例 #5
0
ファイル: function.php プロジェクト: lz1988/stourwebcms
 public static function getDaySpot($day, $lineid, $webid)
 {
     global $dsql;
     $out = null;
     $sql = "select * from #@__line_dayspot where day = '{$day}' and lineid='{$lineid}'";
     $arr = $dsql->getAll($sql);
     foreach ($arr as $row) {
         $spotinfo = getInfo('#@__spot', "where id='{$row['spotid']}' ", 'aid,content,piclist,litpic,title,webid');
         $description = cutstr_html(strip_tags($spotinfo['content']), 200);
         //景点描述
         $spotpic = self::getSpotPic($spotinfo, $row['spotid'], $webid);
         $out .= '    <div class="day_spot">
                     <span class="tit">景点</span>
                     <div class="spot_con">
                       <h4 class="tit">' . $row['title'] . '</h4>
                       <div class="txt">
                         <p>' . $description . '</p>
                       </div>
                       <ul class="ul_list">
                        ' . $spotpic . '
                       </ul>
                     </div>
                   </div>';
     }
     return $out;
 }
コード例 #6
0
                ?>
">
<img src="<?php 
                echo $vo["img"];
                ?>
" alt="<?php 
                echo $vo["title"];
                ?>
" ></a>
</div><?php 
            }
            ?>

           <div class="sumcontent hidden-xs">
        <p class="excerpt wordbreak "><?php 
            echo cutstr_html(op_t($vo["description"]), 150);
            ?>
</p>
                </div>
    </div>
</section><?php 
        }
    }
} else {
    echo "";
}
?>



                <div class="text-center">
コード例 #7
0
ファイル: show.php プロジェクト: lz1988/stourwebcms
    $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']);
    $row['summary'] = empty($row['summary']) ? cutstr_html($row['content'], 140) : $row['summary'];
    $row['kindid'] = $row['destid'];
    $row['dest_html'] = !empty($row['destid']) ? "<div class=\"page_top\">" . "<a href=\"/raiders/{$row['pinyin']}\">" . Helper_Archive::getBelongDestName($row['kindlist']) . "</a><span>旅游攻略</span>共{$row['destarcnum']}篇</div>" : '';
    //是否设置了目的地条件,便于展示推荐线路
    if (!empty($row['destid'])) {
        $GLOBALS['condition']['_hasdest'] = 1;
    }
    foreach ($row as $k => $v) {
        $pv->Fields[$k] = $v;
    }
}
//获取上级开启了导航的目的地
getTopNavDest($row['kindlist']);
$typename = GetTypeName($typeid);
//获取栏目名称.
$pv->Fields['typename'] = $typename;
コード例 #8
0
    if (count($__LIST__) == 0) {
        echo "";
    } else {
        foreach ($__LIST__ as $key => $vo) {
            $mod = $i % 2;
            ++$i;
            ?>
<li class="widget-links__item">
                    <a href="<?php 
            echo CSU('/artc/' . $vo['id'], 'Index/artc', array('id' => $vo['id']));
            ?>
" title="<?php 
            echo $vo["title"];
            ?>
"><?php 
            echo cutstr_html($vo["title"], 20);
            ?>
</a>
                    <small class="text-muted">
                        <?php 
            echo $vo["sccount"];
            ?>
 收藏,
                        <?php 
            echo $vo["view"];
            ?>
 浏览
                    </small>
                </li><?php 
        }
    }
コード例 #9
0
 public function wxevent($data)
 {
     $artid = C('WXARTID');
     $mapart['id'] = array('in', explode(',', $artid));
     $artarr = M('article')->where($mapart)->order('tj desc')->select();
     $art = array();
     foreach ($artarr as $key => $vo) {
         $art[$key] = array('Title' => $vo['title'], 'Description' => cutstr_html(op_t($vo['description']), 50), 'PicUrl' => getImgs($vo['description'], 0), 'Url' => (is_ssl() ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'] . '/' . C('WEB_DIR') . '/' . CSU('/artc/' . $vo['id'], 'Index/artc', array('id' => $vo['id'])));
     }
     if ($data['event'] == 'subscribe') {
         $result = array('MsgType' => 'text', 'Content' => C('WXWELCOME'));
     }
     if ($data['event'] == 'CLICK') {
         if ($data['key'] == 'newblog') {
             $result = array('MsgType' => 'news', 'Content' => $art);
         }
     }
     switch ($result['MsgType']) {
         case 'text':
             $this->wx->text($result['Content'])->reply();
             break;
         case 'news':
             $this->wx->news($result['Content'])->reply();
             break;
     }
 }
コード例 #10
0
ファイル: query.php プロジェクト: lz1988/stourwebcms
 public static function getSellPoint($id, $typeid)
 {
     $row = self::getProductInfo($id, $typeid);
     return $row['sellpoint'] ? cutstr_html($row['sellpoint'], 70) : '';
 }