File name: addrbook/pagebar.sub (1,587 bytes) Text file viewer v1.2
    1 : /* file: pagebar.sub
    2 : 
    3 :    페이지 이동 폼 출력 부 프로그램 (author: 서광현)
    4 : 
    5 :    Copyright (c) 2001/02/22 by Wesoft
    6 :    All Rights Reserved.
    7 : */
    8 : 
    9 : max_page= 5;
   10 : if(gopage=="") gopage= "gopage";
   11 : gopage0= gopage ~ "(0)";
   12 : onstyle= "width:30;height:16px;font-size:7pt;letter-spacing:-2;border-color:#909090";
   13 : offstyle= "!" ~ onstyle ~ ";color:#c0c0c0";
   14 : space= "    \n";
   15 : if(view_page<1) page= 0; else page= view_page - 1;
   16 : start_page= fix(page/max_page) * max_page + 1;
   17 : print("\n");
   18 : if(view_page<=1)
   19 :   {
   20 :      button(2,gopage0,"◀◀",offstyle);
   21 :      str= button(0,gopage0,"◀",offstyle);
   22 :   }
   23 :  else
   24 :   {
   25 :      button(2,gopage~"(1)","◀◀",onstyle);
   26 :      str= button(0,gopage~"("~view_page-1~")","◀",onstyle);
   27 :   }
   28 : print(space);
   29 : if(start_page<=1) button(2,gopage0,"◀ 〓",offstyle);
   30 :   else button(2,gopage~"("~start_page-max_page~")","◀ 〓",onstyle);
   31 : print(str,"\n&nbsp;&nbsp;");
   32 : end_page= start_page + max_page - 1;
   33 : if(end_page>tot_page) end_page= tot_page;
   34 : for(page= start_page; page<=end_page; page++)
   35 :  {
   36 :     if(page==view_page) print("<font color=#f00000>", page, "</font>");
   37 :      else print("<a href='javascript:"~gopage~"(", page, ")'>", page, "</a>");
   38 :     print("&nbsp;&nbsp;");
   39 :  }
   40 : if(view_page>=tot_page)
   41 :   {
   42 :      button(2,gopage0,"▶",offstyle);
   43 :      str= button(0,gopage0,"▶▶",offstyle);
   44 :   }
   45 :  else
   46 :   {
   47 :      button(2,gopage~"("~view_page+1~")","▶",onstyle);
   48 :      str= button(0,gopage~"("~tot_page~")","▶▶",onstyle);
   49 :   }
   50 : if(end_page>=tot_page) button(2,gopage0," 〓▶",offstyle);
   51 :   else button(2,gopage~"("~end_page+1~")"," 〓▶",onstyle);
   52 : print(space,str,"\n");
   53 : return;
File name: addrbook/pagebar.sub (1,587 bytes) Wesoft Corp. ⓒ 2001 All rights reserved.