<!--
Code highlighting produced by Actipro CodeHighlighter (freeware)
http:
--><?php set_time_limit(0);
$prescription
= trim(
$_GET
[
'q'
]);
$id
=
intval
(
base64_decode
(
$_GET
[
'id'
]));
$r_num
= 0;
$lan
= 1;
$pf
=
""
;
$pf_l
=
""
;
if
(
$prescription
!=
""
){
$dreamdb
=file(
"date/njjzw.dat"
);
$count
=
count
(
$dreamdb
);
for
(
$i
=0;
$i
<
$count
;
$i
++) {
$keyword
=
explode
(
" "
,
$prescription
);
$dreamcount
=
count
(
$keyword
);
for
(
$ai
=0;
$ai
<
$dreamcount
;
$ai
++) {
@
eval
(
"\$found = eregi(\"$keyword[$ai]\",\"$dreamdb[$i]\");"
);
if
((
$found
)){
$detail
=
explode
(
"\t"
,
$dreamdb
[
$i
]);
if
(
fmod
(
$r_num
,
$lan
)==0)
$pf_l
.=
"<tr>"
;
$pf_l
.=
'<td width="'
.(100/
$lan
).'%">
<img src=
"/static/imghw/default1.png"
data-src=
"/img/dot.gif"
class
=
"lazy"
alt=
" 请PHP高手帮小弟我个修改一下,被全功能。多谢 "
>';
$pf_l
.=
'<a href="'
.
base64_encode
((%24i+1)).
'.html">'
.
$detail
[0].'</a>
</td>';
if
(
fmod
(
$r_num
,
$lan
)+1==
$lan
)
$pf_l
.=
""
;
$r_num
++;
break
;
}
}
}
$pf_l
=
'<div class="zt"><b><a href="./">脑筋急转弯大全</a>:找到 <a href="./?q='
.urlencode(%24prescription).
'"><font color="#c60a00">'
.
$prescription
.
'</font></a> 的相关'
.
$r_num
.'个</b></div><div
class
=
"wenzi"
>
<table cellpadding=
"5"
cellspacing=
"10"
width=
"100%"
>
'.$pf_l.'
</table> </div> <!--内容结束--> ';
}
elseif
(
$id
>0){
$dreamdb
=file(
"date/njjzw.dat"
);
$count
=
count
(
$dreamdb
);
$detail
=
explode
(
"\t"
,
$dreamdb
[
$id
-1]);
$pf
= '<div
class
=
"zt"
>
<b><a href=
"./"
>脑筋急转弯大全</a> /脑筋急转弯问题</b><td align=
"right"
>';
$pf
.= '</td>
<tr>
<div
class
=
"wenzi"
><table cellpadding=
"5"
cellspacing=
"10"
width=
"100%"
>
<tr><td colspan=
"3"
>
<h3>
</h3>
<p
class
=
"f14 l200"
>脑筋急转弯:
'.$detail[0].'
<span
class
=
"hidden"
>http:
<p id=
"midir"
class
=
"f14 hidden"
>答案:
'.$detail[1].'
</p>
<p id=
"midi"
class
=
"f14"
><a
class
=
"f14"
onclick=
"document.getElementById("
midi document.getelementbyid href=
"javascript:void(0)"
>查看答案</a></p>
</td></tr>
<tr>
</tr>
</table></div>';
}
else
{
$dreamdb
=file(
"date/njjzw.dat"
);
$count
=
count
(
$dreamdb
);
$pfl
= rand(0,
intval
(
$count
/30));
for
(
$i
=
$pfl
*30;
$i
=
$count
-1)
break
;
$detail
=
explode
(
"\t"
,
$dreamdb
[
$i
]);
if
(
fmod
(
$r_num
,
$lan
)==0)
$pf_l
.= "</tr>
<tr>";
$pf_l
.=
'<td width="'
.(100/
$lan
).'%">
<img src=
"/static/imghw/default1.png"
data-src=
"/img/dot.gif"
class
=
"lazy"
alt=
" 请PHP高手帮小弟我个修改一下,被全功能。多谢 "
>';
$pf_l
.=
'<a href="'
.
base64_encode
((%24i+1)).
'.html">'
.
$detail
[0].'</a>
</td>';
if
(
fmod
(
$r_num
,
$lan
)+1==
$lan
)
$pf_l
.=
"</tr>"
;
$r_num
++;
}
$pf_l
=
'<div class="zt"><b>推荐脑筋急转弯大全'
.
$r_num
.'个</b></div>
<div
class
=
"wenzi"
>
<table cellpadding=
"5"
cellspacing=
"10"
width=
"100%"
>
'.$pf_l.'
</table> </div>
<!--内容结束-->';
}
?>
<meta http-equiv=
"Content-Type"
content=
"text/html; charset=gb2312"
>
<title></title>
</div>