Results peer page limited to 10
This commit is contained in:
parent
b92a543cb0
commit
52b081768e
12
index.php
12
index.php
|
@ -59,9 +59,10 @@ $keyword_with_space = "/" . " " . $search_keyword . " " . "/i";
|
|||
$keyword_in_start_title = "/" . "<b>" . $search_keyword . "" . "/i";
|
||||
|
||||
$t1=0;
|
||||
//while($t1 <= 9){
|
||||
|
||||
foreach(preg_split("/((\r?\n)|(\r\n?))/",$txt) as $line){
|
||||
if(preg_match($keyword_in_start_title,$line)){
|
||||
if($t1!=10&&preg_match($keyword_in_start_title,$line)){
|
||||
if(!($search_keyword=="")){
|
||||
echo "<div class='item'>";
|
||||
$line = highlight($line,$search_keyword);
|
||||
|
@ -73,7 +74,7 @@ $t1=1;
|
|||
}
|
||||
|
||||
foreach(preg_split("/((\r?\n)|(\r\n?))/",$txt) as $line){
|
||||
if(preg_match($keyword_with_space,$line)&&!(preg_match($keyword_in_start_title,$line))){
|
||||
if($t1!=10&&preg_match($keyword_with_space,$line)&&!(preg_match($keyword_in_start_title,$line))){
|
||||
if(!($search_keyword=="")){
|
||||
echo "<div class='item'>";
|
||||
$line = highlight($line,$search_keyword);
|
||||
|
@ -85,7 +86,7 @@ $t1=1;
|
|||
}
|
||||
|
||||
foreach(preg_split("/((\r?\n)|(\r\n?))/",$txt) as $line){
|
||||
if(preg_match($keyword,$line)&&!(preg_match($keyword_with_space,$line))&&!(preg_match($keyword_in_start_title,$line))){
|
||||
if($t1!=10&&preg_match($keyword,$line)&&!(preg_match($keyword_with_space,$line))&&!(preg_match($keyword_in_start_title,$line))){
|
||||
if(!($search_keyword=="")){
|
||||
echo "<div class='item'>";
|
||||
$line = highlight($line,$search_keyword);
|
||||
|
@ -96,7 +97,10 @@ $t1=1;
|
|||
}
|
||||
}
|
||||
|
||||
if($t1==0){echo "<div class='item' style='text-align:center'><h3>( ̄ω ̄;) 0 results...</h3></div>";}
|
||||
//}
|
||||
|
||||
if($t1==0){echo "<div class='item' style='text-align:center'><h3>( ̄ω ̄;) 0 results...</h3></div>";}
|
||||
if($t1==9){echo "<p class='btn'>View more (coming soon)</p>";}
|
||||
|
||||
}
|
||||
?>
|
||||
|
|
Loading…
Reference in New Issue