Need help with sketch structure and if/else if function

You could use another set of if/else to select the page and inside THOSE put the code to act on the buttons for that page.

  if (page == 1)
  {
.
.
.
  }
  else if (page == 2)
  {
.
.
.
  }
  else if (page == 3)
  {
.
.
.
  }