Copy codeThe Code is as follows:
<! --
// ASP paging Function
Function ShowListPage (page, Pcount, TopicNum, maxperpage, strLink, ListName ){
Var alertcolor = '# FF0000 ';
Maxperpage = Math. floor (maxperpage );
TopicNum = Math. floor (TopicNum );
Page = Math. floor (page );
Var n, p;
If (page-1) % 10 = 0 ){
P = (page-1)/10
} Else {
P = (page-1)-(page-1) % 10)/10)
}
If (TopicNum % maxperpage = 0 ){
N = TopicNum/maxperpage;
} Else {
N = (TopicNum-TopicNum % maxperpage)/maxperpage + 1;
}
Document. write ('<table border = "0" cellpadding = "0" cellspacing = "1" class = "Tableborder5"> ');
Document. write ('<form method = post action = "? Pcount = '+ Pcount + strLink +' "> ');
Document. write ('<tr align = "center"> ');
Document. write ('<td class = "tabletitle1" title = "' + ListName + '">' + ListName + '</td> ');
Document. write ('<td class = "tabletitle1" title = "">' + TopicNum + '</td> ');
Document. write ('<td class = "tabletitle1" title = "">' + maxperpage + '</td> ');
Document. write ('<td class = "tabletitle1" title = "">' + page + '/' + Pcount + 'page </td> ');
If (page = 1 ){
Document. write ('<td class = "tablebody1"> <font face = webdings> 9 </font> </td> ');
} Else {
Document. write ('<td class = "tablebody1"> <a href = "? Page = 1' + strLink + '"title =" Homepage "> <font face = webdings> 9 </font> </a> </td> ');
}
If (p * 10> 0 ){
Document. write ('<td class = "tablebody1"> <a href = "? Page = '+ p * 10 + strLink +' "title =" Top 10 pages "> <font face = webdings> 7 </font> </a> </td>' );
}
If (page <2 ){
Document. write ('<td class = "tablebody1"> first page </td> ');
Document. write ('<td class = "tablebody1"> previous page </td> ');
} Else {
Document. write ('<td class = "tablebody1"> <a href = "? Page = 1' + strLink + '"title =" Homepage "> first page </a> </td> ');
Document. write ('<td class = "tablebody1"> <a href = "? Page = '+ (page-1) + strLink +' "title =" Previous page "> previous page </a> </td> ');
}
If (Pcount-page <1 ){
Document. write ('<td class = "tablebody1"> next page </td> ');
Document. write ('<td class = "tablebody1"> last page </td> ');
} Else {
Document. write ('<td class = "tablebody1"> <a href = "? Page = '+ (page + 1) + strLink +' "title =" next page "> next page </a> </td> ');
Document. write ('<td class = "tablebody1"> <a href = "? Page = '+ Pcount + strLink +' "title =" last page "> last page </a> </td> ');
}
For (var I = p * 10 + 1; I <p * 10 + 11; I ++ ){
If (I = n) break;
}
If (I <n ){
Document. write ('<td class = "tablebody1"> <a href = "? Page = '+ I + strLink +' "title =" next 10 pages "> <font face = webdings> 8 </font> </a> <td> ');
}
If (page = n ){
Document. write ('<td class = "tablebody1"> <Font face = webdings >:</font> </td> ');
} Else {
Document. write ('<td class = "tablebody1"> <a href = "? Page = '+ n + strLink +' "title =" "> <font face = webdings >:</font> </a> </td> ');
}
Document. write ('<td class = "tablebody1"> <input class = "PageInput" type = text name = "page" size = 1 maxlength = 10 value = "' + page +' "> </td> ');
Document. write ('<td class = "tablebody1"> <input type = submit value = Go name = submit class = "PageInput"> </td> ');
Document. write ('</tr> ');
Document. write ('</form> </table> ');
}
// HTML paging Function
Function ShowHtmlPage (page, Pcount, TopicNum, maxperpage, strLink, ExtName, ListName ){
Var alertcolor = '# FF0000 ';
Maxperpage = Math. floor (maxperpage );
TopicNum = Math. floor (TopicNum );
Page = Math. floor (page );
Var n, p;
If (page-1) % 10 = 0 ){
P = (page-1)/10
} Else {
P = (page-1)-(page-1) % 10)/10)
}
If (TopicNum % maxperpage = 0 ){
N = TopicNum/maxperpage;
} Else {
N = (TopicNum-TopicNum % maxperpage)/maxperpage + 1;
}
Document. write ('<table border = "0" cellpadding = "0" cellspacing = "1" class = "Tableborder5"> ');
Document. write ('<form method = post> ');
Document. write ('<tr align = "center"> ');
Document. write ('<td class = "tabletitle1" title = "' + ListName + '">' + ListName + '</td> ');
Document. write ('<td class = "tabletitle1" title = "">' + TopicNum + '</td> ');
Document. write ('<td class = "tabletitle1" title = "">' + maxperpage + '</td> ');
Document. write ('<td class = "tabletitle1" title = "">' + page + '/' + Pcount + 'page </td> ');
If (page = 1 ){
Document. write ('<td class = "tablebody1"> <font face = webdings> 9 </font> </td> ');
} Else {
Document. write ('<td class = "tablebody1"> <a href = "Index' + ExtName +'" title = "Homepage"> <font face = webdings> 9 </font> </a> </td> ');
}
If (p * 10> 0 ){
Document. write ('<td class = "tablebody1"> <a href = "' + strLink + (p * 10) + ExtName + '"title =" Top 10 pages "> <font face = webdings> 7 </font> </a> </td> ');
}
If (page <3 ){
Document. write ('<td class = "tablebody1"> first page </td> ');
Document. write ('<td class = "tablebody1"> <a href = "Index' + ExtName +'" title = "Previous Page"> Previous Page 1 </a> </td>' );
} Else {
Document. write ('<td class = "tablebody1"> <a href = "Index' + ExtName +'" title = "Homepage"> first page 1/a> </td>' );
Document. write ('<td class = "tablebody1"> <a href = "' + strLink + (page-1) + ExtName + '"title =" Previous Page "> previous page </a> </td> ');
}
If (Pcount-page <1 ){
Document. write ('<td class = "tablebody1"> next page 1 </td> ');
Document. write ('<td class = "tablebody1"> last page </td> ');
} Else {
Document. write ('<td class = "tablebody1"> <a href = "' + strLink + (page + 1) + ExtName + '"title =" next page "> next page </a> </td> ');
Document. write ('<td class = "tablebody1"> <a href = "' + strLink + Pcount + ExtName + '" title = "last page"> last page </a> </td> ');
}
For (var I = p * 10 + 1; I <p * 10 + 11; I ++ ){
If (I = n) break;
}
If (I <n ){
Document. write ('<td class = "tablebody1"> <a href = "' + strLink + I + ExtName + '" title = "next 10 pages"> <font face = webdings> 8 </font> </a> <td> ');
}
If (page = n ){
Document. write ('<td class = "tablebody1"> <Font face = webdings >:</font> </td> ');
} Else {
Document. write ('<td class = "tablebody1"> <a href = "' + strLink + n + ExtName + '" title = ""> <font face = webdings>: </font> </a> </td> ');
}
// Document. write ('<td class = "tabletitle1" title = "GO"> GO </td> ');
Document. write ('<td class = "tablebody1"> <select class = "PageInput" name = "page" size = "1" onchange = "javascript: window. location = this. options [this. selectedIndex]. value; "> ');
Document. write ('<option value = "Index' + ExtName +'"> page 1st </option> ');
For (var I = 2; I <TopicNum; I ++ ){
If (I = page ){
Document. write ('<option value = "' + strLink + I + ExtName + '" selected> page' + I + '</option> ');
} Else {
If (I = 1 ){
Document. write ('<option value = "Index' + ExtName +'"> page 1st </option> ');
} Else {
Document. write ('<option value = "' + strLink + I + ExtName + '"> page' + I + '</option> ');
}
}
If (I = n) break;
}
Document. write ('</select> </td> ');
Document. write ('</tr> ');
Document. write ('</form> </table> ');
}
// -->