<?php 
	if ($_GET['page']=="") {$_GET['page']=1;}; 	//判断变量的值是否为空
	include("function.php");	//调用指定的包含文件，即自定义函数
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>版权声明</title>
</head>
<body>
<table width="750" height="174" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="35" align="center">&nbsp;</td>
    <td width="680" height="27" align="center"><strong>版权声明</strong></td>
    <td width="35" align="center">&nbsp;</td>
  </tr>
  <tr>
    <td align="left" valign="middle">&nbsp;</td>
    <td height="90" align="left" valign="middle"><table width="100%" height="52" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td bgcolor="#FFFFFF">
<?php   

  if($_GET['page']){
	 $counter=file_get_contents("file/file.txt");
     $length=strlen(unhtml($counter));
     $page_count=ceil($length/1050);
 
     $c=msubstr($counter,0,($_GET['page']-1)*1050);
     $c1=msubstr($counter,0,$_GET['page']*1050);
		echo substr($c1,strlen($c),strlen($c1)-strlen($c)); 
  }?>
    </td>
      </tr>
    </table></td>
    <td align="left" valign="middle">&nbsp;</td>
  </tr>
</table>
<table width="680" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="42%" align="center" valign="middle" bgcolor="#FFFFFF"><span class="STYLE1">&nbsp;&nbsp;页次：<?php echo $_GET['page'];?> / <?php echo $page_count;?> 页 </span></td>
    <td width="58%" height="28" align="left" valign="middle" bgcolor="#FFFFFF"><span class="STYLE1"> &nbsp;分页：
             <?php
	  		  if($_GET['page']!=1){   
				     echo  "<a href=index.php?lmbs=明日版权声明&page=1>首页</a>&nbsp;";
					 echo "<a href=index.php?lmbs=明日版权声明&page=".($_GET['page']-1).">上一页</a>&nbsp;";
				   }
				  if($_GET['page']<$page_count){
				        echo "<a href=index.php?lmbs=明日版权声明&page=".($_GET['page']+1).">下一页</a>&nbsp;";
				        echo  "<a href=index.php?lmbs=明日版权声明&page=".$page_count.">尾页</a>";				
				   }				   
			  ?>     
    </span> </td>
  </tr>
</table>
</body>
</html>
