I originally wanted to use a paging program I found online, but I had to make modifications. I thought it was troublesome, so I decided to write one myself. It would be easier to modify it when I use it in the future~~ If everyone is more hands-on, the one written by yourself is the best. Yes, it is easy to make modifications to whatever you want to do in the future~~I will also expand my code base by the way~~
In addition, cpage is the page count and should be a global variable, so that it can be called anywhere. totalpage is the total number of pages