A | A| A

Mục lục:

location.href ="'.$link.'";'; } else { load_random(); } ?>
 
".$anphas[$i].""; $dot=" | "; echo $s; } } function keyword_anpha ($anpha) { global $currentPage,$lang; $k=strtolower(trim($anpha)); $sql_count="select id,key_search from keyword_".$k." where google_index=0 ORDER BY key_search ASC "; $result_count=mysql_query($sql_count); $total=@mysql_num_rows($result_count); $div=5; $rows =100; $start=($currentPage*$rows); $s="select id,key_search from keyword_".$k." where google_index=0 ORDER BY key_search ASC limit $start,$rows"; $result=mysql_query($s); $total_page=@mysql_num_rows($result); $per = $total_page / 2; if ($total>0) {$return1 = '
    '; $return2 = '
      '; $i=1; $stt = $currentPage*$rows+1 ; $underlines1 = ''; $underlines2 = ''; while($row = mysql_fetch_array($result)) { $key_search=substr($row["key_search"],2,count($row["key_search"])-2); $link=company(addslashes($k),addslashes($row["id"]),addslashes($lang)); $s="".$key_search.""; $s=str_replace(";","",$s); if($i > $per ) { $underlines2 = 'overline'; $return2 .= '
    1. '.$stt.'. '.$s.'
    2. '; }else{ $underlines1 = 'overline'; $return1 .= '
    3. '.$stt.'. '.$s.'
    4. '; } $stt++; $i++; } $paging = '
      Hiển thị: : ( '.($start + 1).' - '.($start +$rows ).' ) / '.($total).'
      '.divPage($total,$currentPage,$div,$rows,"nganhnghe.php?/vn/".$k."//").'
      '; //$paging=divPage($total,$currentPage,$div,$rows,"nganhnghe.php?/vn/".$k."//"); $return1 .= '
    '; $return2 .= '
'; $return = '
'.$return1.'
'.$return2.'
'.$paging.'
' ; echo $return; } } function load_random() { global $currentPage,$lang; $anphas =array('a', 'b' , 'd', 'e', 'f' , 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y','c'); $stt=1; $return1=""; $return2=""; for($i=0;$i".$key_search.""; $s=str_replace(";","",$s); $underlines2 = 'overline'; $return2 .= '
  • '.$stt.'. '.$s.'
  • '; $stt++; } } else{ $sql="select id,key_search from keyword_".$anphas[$i]." where google_index=0 ORDER BY RAND() limit 4"; $result=mysql_query($sql); while($row = mysql_fetch_array($result)) { $key_search=substr($row["key_search"],2,count($row["key_search"])-2); $link=company(addslashes($k),addslashes($row["id"]),addslashes($lang)); $s="".$key_search.""; $s=str_replace(";","",$s); $underlines1 = 'overline'; $return1 .= '
  • '.$stt.'. '.$s.'
  • '; $stt++; } } } $return1 .= ''; $return2 .= ''; $return = '
    '.$return2.'
    '.$return1.'
    ' ; echo $return; } function company($keyword_al,$id,$lang) { global $com; $k=$keyword_al.$id; $key_word=xuly_keyword(get_keyword($keyword_al,$id)); $seo=$com->create_keyword($key_word).".html"; $link="http://www.yellowpages.vn/".$lang."/".$k."/".$seo.""; return $link; } function get_keyword($keyword_al,$id) { $s="select id,key_search from keyword_".$keyword_al." where id=$id limit 1"; $result=mysql_query($s); if ($result) { $data=mysql_fetch_assoc($result); return $data["key_search"]; } else return "***"; } //bo 2 dau ; function xuly_keyword($key_word) { $list_key=array(); $key=explode(";",$key_word); $keyword=""; for($i=0;$iTrang đầu  '; $sPage .= '  Trước...  '; } $count =($nPage<=($currentDiv+1)*$div)?($nPage-$currentDiv*$div):$div; for($i=0;$i<$count;$i++){ $page = ($currentDiv*$div + $i); if($page==$currentPage){ $sPage .= ' '.($page==0?1 : $page+1 ).' '; }else{ $sPage .= '  '.($page==0?1:$page+1).'  '; } } if($currentDiv < $nDiv - 1){ if (($currentDiv+1)*$div < ($total/$rows)) { $sPage .= '  ...Tiếp  '; $sPage .= '  Trang Cuối  '; } } return $sPage ; } ?>