echo $row["url"]; ?> ')" onMouseOut="cs()" href="<?php echo $site["url"]; ?> /q/?<?php echo $row["link_id"]; ?> _<?php echo $wd_en; ?> " target="_blank"><font size="3"><?php echo str_cut($row["title"], 60); ?> </font></a><br><font size=-1><?php echo replace_filter_word(str_cut($row["fulltxt"], 250)); ?> <br><font color=#008000><?php echo str_cut($row["url"], 50); ?> <?php echo $row["pagesize"]; ?> K <?php echo date("Y-m-d", $row["updatetime"]); ?> </font> - <a href="<?php echo $config["url"] . "/k/?" . base64_encode("url=" . $row["url"] . "&wd=" . $wd_split . ""); ?> " target="_blank" class=m><?php
function q($wd, $domain = '') { global $db; $this->db =& $db; $this->wd = $wd; if (empty($wd)) { $sql = "select * from ve123_links where title<>'' order by updatetime desc"; } elseif (!empty($domain)) { if ($domain == getdomain($domain)) { $sql = "select * from ve123_links where title<>'' and url like '%." . $domain . "%' or url like '%//" . $domain . "%'"; //echo $sql; } else { $sql = "select * from ve123_links where title<>'' and url regexp 'http://" . $domain . "'"; //echo $sql; } } else { $this->update_keywords(); require PATH . "include/splitword.func.php"; $sp = new SplitWord(); $wd_split = $sp->SplitRMM($wd); $sp->Clear(); $this->wd_split = $wd_split = ereg_replace("[ ]{1,}", " ", trim($wd_split)); $this->wd_array = $wd_array = explode(" ", $wd_split); $this->wd_count = $wd_count = count($wd_split); //echo $wd_count; $tgarray = $this->GetTg(); $tgarray_count = count($tgarray); $ordersql = " order by ("; foreach ($wd_array as $value) { $strlen = strlen($value); if ($strlen > 2) { $points = $strlen; } else { $points = 1; } $ordersql .= "(case when title like '%" . $value . "%' then " . $points . " else 0 end)+"; } $ordersql .= "(case when title like '%" . $wd . "%' then 8 else 0 end)"; // $ordersql=rtrim($ordersql,"+"); $ordersql .= ") desc,updatetime desc"; $keywordsql = $this->GetKeywordSql("title,' ',url,' ',keywords,' ',fulltxt"); if (empty($keywordsql)) { $keywordsql = "title like '%" . $wd . "%'"; } $sql = "select * from ve123_links where title<>'' and " . $keywordsql . $ordersql; // // } //echo $sql; $query = $db->query($sql); $this->total = $total = $db->num_rows($query) + $tgarray_count; $pagesize = 10; $this->totalpage = $totalpage = ceil($total / $pagesize); $p = intval($_GET["p"]); if ($p <= 0) { $p = 1; } $offset = ($p - 1) * $pagesize; $query = $db->query($sql . " limit {$offset},{$pagesize}"); while ($row = $db->fetch_array($query)) { $data["title"] = $this->GetRedKeyWord(replace_filter_word(str_cut($row["title"], 60))); $data["txt"] = $this->GetRedKeyWord(replace_filter_word(str_cut($row["fulltxt"], 250))); $data["description"] = $this->GetRedKeyWord(replace_filter_word(str_cut($row["description"], 250))); $data["url"] = str_cut($row["url"], 50); $data["updatetime"] = date("Y-m-d", $row["updatetime"]); $data["pagesize"] = $row["pagesize"]; $data["link_id"] = $row["link_id"]; $data["tuiguang"] = $row["tuiguang"]; $array[] = $data; } $array_count = count($array); if (empty($array_count)) { $newarray = $tgarray; } elseif ($p == 1 && $tgarray_count > 0) { $newarray = array_merge($tgarray, $array); } else { $newarray = $array; } return $newarray; }
echo str_cut($row["title"], 60); ?> "><font size="3" color=\"#3366CC\"><?php echo str_cut($row["title"], 60); ?> </font></a><br> </H2> <DIV class=dig> <div align="left"> <font size=-1> <?php if (empty($link["description"])) { echo replace_filter_word(str_cut($row["fulltxt"], 240)); } else { echo replace_filter_word(str_cut($row["description"], 240)); } ?> </div> </DIV> <P align="left"><img width=66 height=13 alt="该网站的流行指数" class=primg src="../pr/pr.php?<?php echo str_cut($row["url"], 50); ?> " /> <font color=#008000><?php echo str_cut($row["url"], 50); ?> <?php echo $row["pagesize"]; ?> K <?php echo date("Y-m-d", $row["updatetime"]);