页1,2,3……
for (int m = 1; m <= upbound; m++)
{
if (m == 1)//如果是第一页就显示成这个样子:20070524.html而不是20070524_1.html
strNumber = strNumber + " [" + "
" + m + "" + "] ";
else
{
int n = m - 1;//第三页的连接应该是20070524_2.html,以此类推
strNumber = strNumber + " [" + "
" + m + "" + "] ";
}
}
if (upbound == 0)//如果没有分页,就直接按日期时间保存
{
filePath = FilePageDir + "//" + strDate + ".shtml";
strhtml = strhtml.Replace("$Pager", "");
}
else//否则按20070524.html、20070524_1.html 这种效果保存
{
strNumber = strNumber.Replace(">" + (i + 1) + "<", ">
" + (i + 1) + "<");
if (i == 0)
filePath = FilePageDir + "//" + strDate + ".shtml";
else
filePath = FilePageDir + "//" + strDate + "_" + i + ".shtml";
if (i == 0)//第一页不显示上一页
strTable = strTable.Replace("$upUrl", "");
if (i <= 1)//上一页分页
strTable = strTable.Replace("$u
pUrl", "
上一页");
else
{
int p = i - 1;
strTable = strTable.Replace("$upUrl", "
上一页");
}
if (upbound == 1)//如果只有一页,则不显示页码
//strNumber="";
strTable = strTable.Replace("$Number", "");
else
strTable = strTable.Replace("$Number", strNumber);//页码替换
/**/
////////////////////////
if (i == upbound - 1)//最后一页不显示下一页
strTable = strTable.Replace("$downUrl", "");
if (i != upbound - 1)//下一页分页
{
int q = i + 1;
strTable = strTable.Replace("$downUrl", "
下一页");