In order to enhance the function on my website, I have developed a text-based search based on my website's actual, now use on my website. In order to
And the vast number of netizens to learn from each other Exchange, I now publish its source code 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");
$file 1=file ("Part.txt");
$file 2=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 ($file 1[$i]);
if ($partnum ==0) {
$dispvar = $fuhao. $file [$i];
Echo";
Echo $dispvar;
Echo";
$lessnum + +;
}
else{
$linkstr = $dispstr [$partnum];
$linknum = $file 2[$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";
?>
http://www.bkjia.com/PHPjc/315550.html www.bkjia.com true http://www.bkjia.com/PHPjc/315550.html techarticle In order to enhance the function on my website, I have developed a text-based search based on my website's actual, now use on my website. In order to and the vast number of netizens learn from each other ...