$n) { preg_match('/(.{' . $n . '}.*?)\b/', $str, $matches); return rtrim($matches[1]) . $delim; }else{ return $str; } } ?> 2) { $sql_web='select * from `cuvinte` where `cuvkey` like "%'.$sim.'%" and `cuvcount` >= "3" order by `data` desc limit '.$st_sim_3.', '.$nr_limit; //echo $sql_web.'
'; $r_web=mysql_query($sql_web); $nr_row=mysql_affected_rows(); while($res_web=mysql_fetch_array($r_web)) { $cuv_similar=$res_web['cuvkey']; $cuvinte_similare.=''.$cuv_similar.', '; $cuv_sim_antet.=$cuv_similar.', '; } if($nr_row < ($nr_limit-2)) $nr_limit=$nr_limit*2; $st_sim_2=0; $st_sim_2=($curent-1)*$nr_limit; $sql_web='select * from `cuvinte` where `cuvkey` like "%'.$sim.'%" and `cuvcount` < "3" order by `cuvcount` desc, `data` desc limit '.$st_sim_2.', '.$nr_limit; //echo $sql_web.'
'; $r_web=mysql_query($sql_web); while($res_web=mysql_fetch_array($r_web)) { $cuv_similar=$res_web['cuvkey']; $cuvinte_similare.=''.$cuv_similar.', '; $cuv_sim_antet.=$cuv_similar.', '; } } } } $cuvinte_similare=substr($cuvinte_similare, 0, -2); $cuv_sim_antet=substr($cuv_sim_antet, 0, -2); } /* $x=8; $xx=3; $cuv_sim_antet=''; $cuv_similare=''; $cuv_sim_titlu=''; $similar=explode(" ", $antetul); if($similar[1]<>'' and $similar[2]=='') { $xx=2; } if($similar[2]<>'' and $similar[4]=='') { $x=6; $xx=1; } if($similar[4]<>'') { $x=4; $xx=0; } foreach($similar as $sim) { if(strlen($sim)>2) { $nr_sim=0; $sql='SELECT DISTINCT `cauta` FROM `caut` WHERE `cauta` like "%'.$sim.'" limit 10'; $r=mysql_query($sql); while($res=mysql_fetch_array($r)) { $cautarea=strtolower($res['cauta']); if($nr_sim<$x) $cuv_sim_antet.=''.$cautarea.', '; if($nr_sim<=$xx) $cuv_similare.=$cautarea.', '; $nr_sim=$nr_sim+1; if($nr_sim>$x) break; } } } $cuv_similare=substr($cuv_similare, 0, -2);*/ //$titlu.=' - '.$cuv_similare; //$antetul.=' - '.$cuv_similare; /*$sql='SELECT DISTINCT `cuvinte_cheie` FROM `directorweb` WHERE `cuvinte_cheie` like "'.$similar[0].'%" limit 3'; $r=mysql_query($sql); while($res=mysql_fetch_array($r)) { $similare_titlu=explode(", ", $res['cuvinte_cheie']); foreach($similare_titlu as $titlul) { if($titlul==$similar[0]) $cuv_sim_titlu.=$titlul.', '; } } if($cuv_sim_titlu<>'') $cuv_sim_titlu=substr($cuv_sim_titlu, 0, -2);*/ $antetul_ahref=ucfirst($antetul); $i_pag=''; if($curent!='' and $curent!=1) { $titlu=$titlu.' | pagina '.$curent; $i_pag=' | pagina '.$curent; $antetul_ahref=''.ucfirst($antetul).' | pagina '.$curent.''; $antetul=$antetul.' | pagina '.$curent; } echo ''.ucfirst($titlu).''; //', '.$cuv_sim_titlu. ?> '; echo ''; ?>
'.$antetul.''; ?>

Cuvinte similare:
 
Cuvinte cautate: '.$i_c.$i_pag.''; $current_0_full=''; $where_str_32=''; $plus=''; $glm=''; $temp=str_replace("+", " ", $_REQUEST['i']); $current=explode(" ", $temp); foreach($current as $curr) { if(!empty($curr) and strlen($curr) > 3) { // verific vocale $plus='+'; //if(isset($_GET['pt']) and !empty($_GET['pt'])) {$plus='+';} $current_0_count=strlen($curr); if($current_0_count>7) { $vocale=substr($curr, -2); $vocale_count=$current_0_count-2; if($vocale=='\"') { $curr=substr($curr, 0, $vocale_count); $glm='"'; } } $current_0_final=$curr; if($current_0_count>4) { $vocale=substr($curr, -1); $vocale_count=$current_0_count-1; if($vocale=="a" or $vocale=="e" or $vocale=="i" or $vocale=="u") $current_0_final=substr($curr, 0, $vocale_count); } if($current_0_count>5) { $vocale=substr($curr, -2); $vocale_count=$current_0_count-2; if($vocale=="le") $current_0_final=substr($curr, 0, $vocale_count); } if($current_0_count>6) { $vocale=substr($curr, -3); $vocale_count=$current_0_count-3; if($vocale=="uri") $current_0_final=substr($curr, 0, $vocale_count); } $ghilimele=substr($curr, 0, 2); if($ghilimele=='\"') { $current_0_final=substr($curr, 2, $vocale_count); $glm='"'; } // end verific vocale $current_0_full.=$plus.$current_0_final.'* '; } else { if(!empty($curr) and (strlen($curr) == 3))// or strlen($curr) == 2 { $where_str_32.= ' and (`descriere` like "% '.$curr.' %" or `titlu` like "% '.$curr.' %" or `descriere` like "% '.$curr.',%" or `titlu` like "% '.$curr.',%")'; } } } if($glm=='"') $current_0_full=$glm.$antetul.$glm; if($current_0_full=='') { $where_str.= $where_str_32; }else{ if($where_str_32=='') { $where_str.= " and (MATCH (`descriere`,`titlu`) AGAINST ('".$current_0_full."' IN BOOLEAN MODE))"; }else{ $where_str.= " and (MATCH (`descriere`,`titlu`) AGAINST ('".$current_0_full."' IN BOOLEAN MODE))".$where_str_32; } } //echo 'swhere= '.$where_str; $geturi='i='.$i_c; if(substr($i_c, 0, 2)=='\"') { $inloc=str_replace('\"', '%22', $i_c); $geturi='i='.$inloc; } } if(isset($_REQUEST['cuvinte']) and !empty($_REQUEST['cuvinte'])) { $pt='cuv'; $cuvinte_cautate='

Cuvinte cautate: '.$cuvinte.'

'; $current_0_full=''; $where_str_32=''; $plus=''; $glm=''; $current=explode(" ",$_REQUEST['cuvinte']); foreach($current as $curr) { if(!empty($curr) and strlen($curr) > 3) { // verific vocale $plus='+'; $current_0_count=strlen($curr); if($current_0_count>7) { $vocale=substr($curr, -2); $vocale_count=$current_0_count-2; if($vocale=='\"') { $curr=substr($curr, 0, $vocale_count); $glm='"'; } } $current_0_final=$curr; if($current_0_count>4) { $vocale=substr($curr, -1); $vocale_count=$current_0_count-1; if($vocale=="a" or $vocale=="e" or $vocale=="i" or $vocale=="u") $current_0_final=substr($curr, 0, $vocale_count); } if($current_0_count>5) { $vocale=substr($curr, -2); $vocale_count=$current_0_count-2; if($vocale=="le") $current_0_final=substr($curr, 0, $vocale_count); } if($current_0_count>6) { $vocale=substr($curr, -3); $vocale_count=$current_0_count-3; if($vocale=="uri") $current_0_final=substr($curr, 0, $vocale_count); } $ghilimele=substr($curr, 0, 2); if($ghilimele=='\"') { $current_0_final=substr($curr, 2, $vocale_count); $glm='"'; } // end verific vocale $current_0_full.=$plus.$current_0_final.'* '; } else { if(!empty($curr) and (strlen($curr) == 3))// or strlen($curr) == 2 { $where_str_32.= ' and (`descriere` like "% '.$curr.' %" or `titlu` like "% '.$curr.' %" or `descriere` like "% '.$curr.',%" or `titlu` like "% '.$curr.',%")'; } } } if($glm=='"') $current_0_full=$glm.$antetul.$glm; if($current_0_full=='') { $where_str.= $where_str_32; }else{ if($where_str_32=='') { $where_str.= " and (MATCH (`descriere`,`titlu`) AGAINST ('".$current_0_full."' IN BOOLEAN MODE))"; }else{ $where_str.= " and (MATCH (`descriere`,`titlu`) AGAINST ('".$current_0_full."' IN BOOLEAN MODE))".$where_str_32; } } //echo 'cuvinte cautate = '.$current_0_full; $geturi='i='.$cuvinte; if(substr($cuvinte, 0, 2)=='\"') { $inloc=str_replace('\"', '%22', $cuvinte); $geturi='i='.$inloc; } } //echo $where_str.'
'; /* if((isset($_REQUEST['cuvinte']) and !empty($_REQUEST['cuvinte'])) or (isset($_REQUEST['i']) and !empty($_REQUEST['i']))) { $listing_sql='SELECT * '.$from.$where_str; mysql_query($listing_sql); if (mysql_affected_rows()==0) { $where_str=str_replace('+', '', $where_str); } } */ ?>
'.$i_c.', '.$c_cheie.', '; //}else{ $cuv_ahref_cheie.=''.$c_cheie.', ';//$c_cheie.', ' //} $nr_cuvinte=$nr_cuvinte+1; //}else{ // break; //} } //if($nr_cuvinte>15) //{ // $cuv_ahref_cheie.='... '; //} $cuv_ahref_cheie=substr($cuv_ahref_cheie, 0, -2); $domeniu_temp=strtolower(str_replace(",", "", $res_web['domeniu'])); $titlu_domeniu=str_replace($domeniu_temp, '', $res_web['titlu'])." | ".$res_web['domeniu']; ?>
credite
$limit) { ?>

Google
 

$last) $prev=$last; if($curent>1) { if($prev==1) { echo 'inapoi '; }else{ echo 'inapoi '; } } else { echo 'inapoi '; } $display_links_string=''; $start_end=2; $cur=intval($max/2); $start=$curent-$cur; if($start<1) $start=1; if($last>$max) $start_end=$last-$max; if($start>=$start_end) $start=$start_end; $end=$start+$max; for ($jump_to_page = $start; ($jump_to_page <= $end) and ($jump_to_page <= $last); $jump_to_page++) { if ($jump_to_page == $curent) { $display_links_string.= '' . $jump_to_page . '  '; } else { if($jump_to_page==1) { $display_links_string.= ''.$jump_to_page.''.$geturi.' '; }else{ $display_links_string.= ''.$jump_to_page.''.$geturi.' '; } } } echo $display_links_string; if($curent<$last) { echo 'inainte'; } else { echo 'inainte'; } ?>
copyright director web goro.ro 2007