Text-based search. In order to enhance the functions on my website, I developed a text-based search based on my website, which is now used on my website. To learn from other users and enhance the functions on my website, I developed a text-based search based on the actual situation of my website, which is now used on my website. To
I learned from each other and communicated with other netizens. I am publishing the source code. the source code is as follows:
$ Dispstr = array ();
$ Dispstr [1] = "disp_ OS .php? Article_id = ";
$ Dispstr [2] = "disp_webma.php? Article_id = ";
$ Dispstr [3] = "disp_webcrea.php? Article_id = ";
$ Dispstr [4] = "disp_program.php? Article_id = ";
$ Dispstr [5] = "disp_create.php? Article_id = ";
$ File = file ("news.txt ");
$ File1 = file ("part.txt ");
$ File2 = file ("number.txt ");
If (! Isset ($ pagenum )){
$ Pagenum = 1;
}
$ Lesssign = 0;
$ Num = count ($ file );
$ Dispnumbeg = 6 * ($ pagenum-1 );;
$ Artnumeof = 6 * $ pagenum;
$ Isdispnum = $ num-$ artnumeof;
If ($ isdispnum <0 ){
$ Dispnumeof = $ num;
$ Lesssign = 1;
}
Else {
$ Dispnumeof = $ artnumeof;
}
$ Sign = 0;
$ Pagec = 0;
For ($ icount = 0; ($ icount <$ num) & ($ sign = 0); $ icount + = 6 ){
For ($ I = 0; $ I <= 6; $ I ++ ){
If ($ icount * 6 + $ I) = $ num ){
$ Sign = 1;
}
}
$ Pagec ++;
}
$ Pagecount = $ pagec;
$ Fuhao = "◇ ";
$ Color = e9eae9;
$ Iscolor = 0;
// $ Linkstr = "disp_ OS .php? Article_id = ";
$ Lessnum = 0;
For ($ I = $ dispnumbeg; $ I <$ dispnumeof; $ I ++ ){
$ Partnum = intval ($ file1 [$ I]);
If ($ partnum = 0 ){
$ Dispvar = $ fuhao. $ file [$ I];
Echo"";
Echo $ dispvar;
Echo"";
$ Lessnum ++;
}
Else {
$ Linkstr = $ dispstr [$ partnum];
$ Linknum = $ file2 [$ I];
$ Lessnum ++;
$ Link = $ linkstr. $ linknum;
$ Dispvar = $ fuhao. $ file [$ I];
Echo"";
Echo "$ dispvar ";
Echo"";
}
If ($ iscolor = 0 ){
$ Color = ffffff;
$ Iscolor = 1;
}
Else {
$ Color = e9eae9;
$ Iscolor = 0;
}
}
If ($ lesssign = 1 ){
For ($ iless = $ lessnum; $ iless <= 5; $ iless ++ ){
Echo"";
Echo $ fuhao ."
N ";
Echo"";
If ($ iscolor = 0 ){
$ Color = ffffff;
$ Iscolor = 1;
}
Else {
$ Color = e9eae9;
$ Iscolor = 0;
}
}
}
Echo"";
?>
Bytes. To learn from other users...