if ($page > 0) {
echo "<span class=\"paginate\"> <a href='{$_SERVER['PHP_SELF']}?search=$search&orderby=$orderby'> <b><<</b> FIRST </a></span> ";
} else {
echo "<span class=\"disabled\"> <b><<</b> FIRST </span> ";
}
if ($page > 1) {
$previous = $page-1;
echo "<span class=\"paginate\"> <a href='{$_SERVER['PHP_SELF']}?search=$search&page=$previous&orderby=$orderby'> <b><</b> PREVIOUS </a></span> ";
} else {
echo "<span class=\"paginate\"> <b><</b> PREVIOUS </span> ";
}
if ($page == $lastx) {
$lastx = $page;
echo " <span class=\"paginate\"> NEXT <b>></b> </span>";
echo " <span class=\"paginate\"> LAST <b>>></b> </span> ";
} else {
$next = $page+1;
echo " <span class=\"paginate\"> <a href='{$_SERVER['PHP_SELF']}?search=$search&page=$next&orderby=$orderby'> NEXT <b>></b> </a></span>";
echo " <span class=\"paginate\"> <a href='{$_SERVER['PHP_SELF']}?search=$search&page=$lastx&orderby=$orderby'> LAST <b>>></b> </a></span> ";
}
echo "</div><br><br>";
} else {
echo "<center><div class=\"error\" >nothing found for <b>". $_GET['search']." </b>\n</div></center>"; }
} // **(this line as 366)**
else { ?>
<div align="center" style="margin-top:30px;">
<div id="srcbox">
<form action="<?=$CFG['domain']?>/index.php" method="get" onsubmit="this.submit();return false;">
<input class="src" name="search" type="text" autocomplete="off" delay="1500" value="type and go..." onBlur="if(this.value=='') this.value='type and go...';" onFocus="if(this.value=='type and go...') this.value='';">
<input type="image" src="<?=$CFG['domain']?>/img/submit.png" name="Submit" value="Submit">
</form>
</div>
</div>
find this word "(this line as 366)"
答案 0 :(得分:1)
你把它关闭了两次
// (此行为366)
并需要
}
之后
<div id="srcbox">
和最终代码:
if ($page > 0) {
echo "<span class=\"paginate\"> <a href='{$_SERVER['PHP_SELF']}?search=$search&orderby=$orderby'> <b><<</b> FIRST </a></span> ";
}else {
echo "<span class=\"disabled\"> <b><<</b> FIRST </span> ";
}
if ($page > 1) {
$previous = $page-1;
echo "<span class=\"paginate\"> <a href='{$_SERVER['PHP_SELF']}?search=$search&page=$previous&orderby=$orderby'> <b><</b> PREVIOUS </a></span> ";
}else {
echo "<span class=\"paginate\"> <b><</b> PREVIOUS </span> ";
}
if ($page == $lastx) {
$lastx = $page;
echo " <span class=\"paginate\"> NEXT <b>></b> </span>";
echo " <span class=\"paginate\"> LAST <b>>></b> </span> ";
} else {
$next = $page+1;
echo " <span class=\"paginate\"> <a href='{$_SERVER['PHP_SELF']}?search=$search&page=$next&orderby=$orderby'> NEXT <b>></b> </a></span>";
echo " <span class=\"paginate\"> <a href='{$_SERVER['PHP_SELF']}?search=$search&page=$lastx&orderby=$orderby'> LAST <b>>></b> </a></span> ";
}
echo "</div><br><br>";
} else { echo "<center><div class=\"error\" >nothing found for <b>". $_GET['search']." </b>\n</div></center>"; }
else
{ ?>
<div align="center" style="margin-top:30px;">
<div id="srcbox">
<form action="<?=$CFG['domain']?>/index.php" method="get" onsubmit="this.submit();return false;">
<input class="src" name="search" type="text" autocomplete="off" delay="1500" value="type and go..." onBlur="if(this.value=='') this.value='type and go...';" onFocus="if(this.value=='type and go...') this.value='';">
<input type="image" src="<?=$CFG['domain']?>/img/submit.png" name="Submit" value="Submit">
</form>
</div>
</div>
<?php } ?>