home *** CD-ROM | disk | FTP | other *** search
- //////////////////////////////////////////////////////////////////////////////
- //
- // Desc: Search userbase and return in RAform
- //
- // Copyright 1996 by Neil Staib
- //
- //////////////////////////////////////////////////////////////////////////////
-
- #include <max.mh>
-
- string ratioup(int: up) // Format ratio uploades
- {
- if (up <= 9)
- return "0" + itostr(up);
- else
- return itostr(up);
- }
-
- string ratiodown(int: down) // Format ratio downloads
- {
- if (down <= 9)
- return "0" + itostr(down);
- else
- return itostr(down);
- }
-
- string lastdate(string: lcdate) // Return Users Last Call or Pad right date format
- {
- if (substr(lcdate, 3,1) <> "-")
- {
- return " ";
- }
- else
- return substr(lcdate,1,9);
- }
-
- void main()
- {
- int: ok;
- char: nonstop;
- struct _usr: usr;
-
- reset_more(nonstop);
-
- print(AVATAR_CLS, COL_WHITE, "Name Location LastOn Calls Ratio\n");
- print(strpad("", 79, '─'), '\n');
-
- ok := userfindopen("", "",usr);
-
- while (ok)
- {
- if (usr.noulist <> 1)
- {
-
- print(COL_LCYAN AVATAR_CLEOL,
- strpad(usr.name,29,' '),
- ' ',
- COL_LGREEN,
- strpad(usr.city,23,' '),
- ' ',
- COL_LBLUE,
- lastdate(stamp_string(usr.ludate)),
- " ",
- COL_YELLOW,
- strpad(itostr(usr.times), 5, ' '),
- " ",
- COL_LRED,
- ratioup(strtoi(ltostr(usr.nup))),
- " :",
- ratiodown(strtoi(ltostr(usr.ndown))),
- '\n');
- }
-
- if (do_more(nonstop, COL_LMAGENTA) = 0);
- {
- do_more(nonstop, COL_LMAGENTA);
- }
-
- ok := userfindnext(usr);
- }
-
- print(COL_LMAGENTA, "\n\nPress (Enter) to continue:");
- getch();
-
- }
-
-