home *** CD-ROM | disk | FTP | other *** search
/ The Devil's Doorknob BBS Capture (1996-2003) / devilsdoorknobbbscapture1996-2003.iso / Dloads / SYSOP / SUP_CHAT.ZIP / ADDME.C next >
Text File  |  1997-06-07  |  9KB  |  376 lines

  1. unsigned char a exp(char b, char c);
  2. {
  3.   char d;
  4.   a=1;
  5.   if !(c=0)
  6.     for (d=0; d<c; d++)
  7.       a=a*b;
  8.   if (c=0) a=1;
  9. }
  10.  
  11. char s[3] cs3(unsigned char c);
  12. {
  13.   s[1]=("0"+(c/100));
  14.   if s[1]=="0" s[1]=" "
  15.   s[2]=("0"+((c/10)%10));
  16.   if s[1]==" " {
  17.     if s[2]=="0" s[2]=" "
  18.   }
  19.   s[3]=("0"+(c%10));
  20. }
  21.  
  22. char s[16] cs4(unsigned short x, char s1[16]);
  23. {
  24.   unsigned char z;
  25.   s="                ";
  26.   for (z=16; z>0; z--)
  27.     if ((x / (exp(2,16-z)))%2)
  28.       s[z]=s1[z];
  29. }
  30.  
  31. char s[5] cs5(unsigned short x);
  32. {
  33.   char y, z, w;
  34.   w=0;
  35.   for (y=0; y>5; y++) {
  36.     w=z;
  37.     z=((x/(10 exp y))%10);
  38.     if ((z=0) && (!(y=5)) && (w=0)) s[y]=" ";
  39.     if (!(w=0)) {
  40.       s[y]=("0"+z);
  41.       z=-1;
  42.     }
  43.   }
  44. }
  45.  
  46. char *s make_app_head(void);
  47. {
  48.   char c[2], s2;
  49.   unsigned char x;
  50.   unsigned short y;
  51.   c[1]=13;
  52.   c[2]=10;
  53.   s2="ABCDEFGHIJKLMNOP";
  54.   strcat(s,"9Name      : 3");
  55.   strcat(s,thisuser.name);
  56.   strcat(s,c);
  57.   strcat(s,"9Birth Day : 3");
  58.   strcat(s,cs3(thisuser.month));
  59.   strcat(s,"/");
  60.   strcat(s,cs3(thisuser.day));
  61.   strcat(s,"/");
  62.   strcat(s,cs3(thisuser.year));
  63.   strcat(s,c);
  64.   strcat(s,"9Note      : 3");
  65.   strcat(s,thisuser.note);
  66.   strcat(s,c);
  67.   strcat(s,"9SL / DSL  : 3");
  68.   strcat(s,cs3(thisuser.sl));
  69.   strcat(s," / ");
  70.   strcat(s,cs3(thisuser.dsl));
  71.   strcat(s,c);
  72.   strcat(s,"9Exemption : 3");
  73.   strcat(s,cs3(thisuser.exempt));
  74.   strcat(s,c);
  75.   strcat(s,"9AR        : 3");
  76.   strcat(s,cs4(thisuser.ar, s2));
  77.   strcat(s,c);
  78.   strcat(s,"9DAR       : 3");
  79.   strcat(s,cs4(thisuser.dar, s2));
  80.   strcat(s,c);
  81.   strcat(s,"9Restricts : 3");
  82.   strcat(s,cs4(thisuser.restrict, restrict_string));
  83.   strcat(s,c);
  84.   strcat(s,"9ASS pts.  : 3");
  85.   strcat(s,cs5(thisuser.ass_pts));
  86.   strcat(s,c);
  87.   strcat(s,"9UL / DL   : 3");
  88.   strcat(s,cs5(thisuser.uploaded));
  89.   strcat(s," / ");
  90.   strcat(s,cs5(thisuser.downloaded));
  91.   strcat(s,c);
  92.   strcat(s,"9Post/Call : 3");
  93.   strcat(s,cs5(thisuser.msgpost);
  94.   strcat(s," / ");
  95.   strcat(s,cs5(thisuser.logons);
  96.   strcat(s,c);
  97.   strcat(s,"9Expert?   : 3");
  98.   strcat(s,("0"+((thisuser.sysstatus/16)%2));
  99.   strcat(s,c);
  100. }
  101.  
  102. /*
  103.  * if app_pur_num = 1 then SL/DSL                                         XX
  104.  * if app_pur_num = 2 then SYSOP                                          XX
  105.  * if app_pur_num = 3 then HOST                                           XX
  106.  * if app_pur_num = 4 then X-FER                                          XX
  107.  * if app_pur_num = 5 then abort                                          XX
  108.  */
  109.  
  110. void application_fill(int app_pur_num);
  111. {
  112.   char ccc[3], ccc1[3],
  113.        why_desired[6][60], why_deserved[6][60],
  114.        requested_sub_name[41],
  115.        sysop_access_level,
  116.        *s, c[2];
  117.  
  118.   c[1]=13;
  119.   c[2]=10;
  120.   if (app_pur_num == 5) break;
  121.   if (app_pur_num != 5) {
  122.     write_inst(INST_LOC_APPLY,0,INST_FLAGS_NONE);
  123.     s=make_app_head()
  124.   }
  125.   if (app_pur_num==1) {
  126.     ansic(3);
  127.     outstr(get_string(1701);
  128.     outstr(cs3(thisuser.sl));
  129.     nl();
  130.     ansic(2);
  131.     outstr(get_string(1703));
  132.     nl();
  133.     mpl(3);
  134.     input(ccc,3);
  135.     nl();
  136.     ansic(3);
  137.     outstr(get_string(1702));
  138.     outsrt(cs3(thisuser.dsl));
  139.     nl();
  140.     ansic(2);
  141.     outstr(get_string(1704));
  142.     nl();
  143.     mpu(3);
  144.     input(ccc1,3);
  145.     nln(2);
  146.     outstr(get_string(1706));
  147.     nl();
  148.     ansic(7);
  149.     mpl(60);
  150.     input(why_desired[1],60);
  151.     nl();
  152.     mpl(60);
  153.     input(why_desired[2],60);
  154.     nln(2);
  155.     ansic(2);
  156.     outstr(get_string(1707));
  157.     nl();
  158.     ansic(7);
  159.     mpl(60);
  160.     input(why_deserved[1],60);
  161.     nl();
  162.     mpl(60);
  163.     input(why_deserved[2],60);
  164.     nl;
  165.     strcat(s,c);
  166.     strcat(s,"9Requests  : 3SL/DSL");
  167.     strcat(s,c);
  168.     strcat(s,"9Wants SL  : 3");
  169.     strcat(s,ccc);
  170.     strcat(s,c);
  171.     strcat(s,"9Wants DSL : 3");
  172.     strcat(s,ccc1);
  173.     strcat(s,"9Desired   : 3");
  174.     strcat(s,why_desired[1]);
  175.     strcat(s,c);
  176.     strcat(s,"            ");
  177.     strcat(s,why_desired[2]);
  178.     strcat(s,c);
  179.     strcat(s,"9Deserved  : 3");
  180.     strcat(s,why_deserved[1]);
  181.     strcat(s,c);
  182.     strcat(s,"            ");
  183.     strcat(s,why_deserved[2]);
  184.     ssm(1,0,s);
  185.   }
  186.   if (app_pur_num==2) {
  187.     outstr(getstring(1708));
  188.     nl();
  189.     sysop_access_level=onek("SCRQ");
  190.     if sysop_access_level=="Q" break;
  191.     strcat(s,"9Wants to be a : 3");
  192.     if sysop_access_level=="S"
  193.       strcat(s,"Sysop");
  194.     if sysop_access_level=="C"
  195.       strcat(s,"Co-Sysop");
  196.     if sysop_access_level=="R"
  197.       strcat(s,"Remote Sysop");
  198.     strcat(s,c);
  199.     nl();
  200.     outstr(getstring(1709));
  201.     nl();
  202.     mpl(60);
  203.     input(why_desired[1],60);
  204.     nl();
  205.     mpl(60);
  206.     input(why_desired[2],60);
  207.     nl();
  208.     outstr(getstring(1710));
  209.     nl();
  210.     mpl(60);
  211.     input(why_deserved[1],60);
  212.     nl();
  213.     mpl(60);
  214.     input(why_deserved[2],60);
  215.     nl();
  216.     strcat(s,"9Why Desired  : 3");
  217.     strcat(s,why_desired[1]);
  218.     strcat(s,c);
  219.     strcat(s,"               ");
  220.     strcat(s,why_desired[2]);
  221.     strcat(s,"9Why Deserved : 3");
  222.     strcat(s,why_deserved[1]);
  223.     strcat(s,c);
  224.     strcat(s,"               ");
  225.     strcat(s,why_deserved[2]);
  226.     strcat(s,c);
  227.     ssm(1,0,s);
  228.   }
  229.   if (app_pur_num==3) {
  230.     outstr(getstring(1711));
  231.     nl();
  232.     mpl(41);
  233.     input(requested_sub_name,41);
  234.     nl();
  235.     outstr(getstring(1712));
  236.     nl();
  237.     outstr(getstring(1713));
  238.     nl();
  239.     mpl(60);
  240.     input(why_desired[1],60);
  241.     nl();
  242.     mpl(60);
  243.     input(why_desired[2],60);
  244.     nl();
  245.     outstr(getstring(1714));
  246.     nl();
  247.     mpl(60);
  248.     input(why_deserved[1],60);
  249.     nl();
  250.     mpl(60);
  251.     input(why_deserved[2],60);
  252.     nl();
  253.     strcat(s,"9Sub Name     : 3");
  254.     strcat(s,requested_sub_name);
  255.     strcat(s,c);
  256.     strcat(s,"9Why Desired  : 3");
  257.     strcat(s,why_desired[1]);
  258.     strcat(s,c);
  259.     strcat(s,"               ");
  260.     strcat(s,why_desired[2]);
  261.     strcat(s,c);
  262.     strcat(s,"9Why Deserved : 3");
  263.     strcat(s,why_deserved[1]);
  264.     strcat(s,c);
  265.     strcat(s,"               ");
  266.     strcat(s,why_deserved[2]);
  267.     strcat(s,c);
  268.     ssm(1,0,s);
  269.   }
  270.   if (app_pur_num==4) {
  271.     outstr(getstring(1715));
  272.     if yn() {
  273.       nl();
  274.       outstr(getstring(1716));
  275.       nl();
  276.       mpu(60);
  277.       input(why_desired[1],60);
  278.       nl();
  279.       mpu(60);
  280.       input(why_desired[2],60);
  281.       nl();
  282.       outstr(getstring(1717));
  283.       nl();
  284.       mpu(60);
  285.       input(why_deserved[1],60);
  286.       nl();
  287.       mpu(60);
  288.       input(why_deserved[2],60);
  289.       strcat(s,"9Wants : X-fer access : 3Hack");
  290.       strcat(s,c);
  291.       strcat(s,"9Why Desired  : 3");
  292.       strcat(s,why_desired[1]);
  293.       strcat(s,c);
  294.       strcat(s,"               ");
  295.       strcat(s,why_desired[2]);
  296.       strcat(s,c);
  297.       strcat(s,"9Why Deserved : 3");
  298.       strcat(s,why_deserved[1]);
  299.       strcat(s,c);
  300.       strcat(s,"               ");
  301.       strcat(s,why_deserved[2]);
  302.       strcat(s,c);
  303.     }
  304.     nl();
  305.     outstr(getstring(1718));
  306.     if yn() {
  307.       nl();
  308.       outstr(getstring(1719));
  309.       nl();
  310.       mpu(60);
  311.       input(why_desired[3],60);
  312.       nl();
  313.       mpu(60);
  314.       input(why_desired[4],60);
  315.       nl();
  316.       outstr(getstring(1720));
  317.       nl();
  318.       mpu(60);
  319.       input(why_deserved[3],60);
  320.       nl();
  321.       mpu(60);
  322.       input(why_deserved[4],60);
  323.       strcat(s,"9Wants : X-fer access : 3Anar");
  324.       strcat(s,c);
  325.       strcat(s,"9Why Desired  : 3");
  326.       strcat(s,why_desired[3]);
  327.       strcat(s,c);
  328.       strcat(s,"               ");
  329.       strcat(s,why_desired[4]);
  330.       strcat(s,c);
  331.       strcat(s,"9Why Deserved : 3");
  332.       strcat(s,why_deserved[3]);
  333.       strcat(s,c);
  334.       strcat(s,"               ");
  335.       strcat(s,why_deserved[4]);
  336.       strcat(s,c);
  337.     }
  338.     nl();
  339.     outstr(getstring(1721));
  340.     if yn() {
  341.       nl();
  342.       outstr(getstring(1722));
  343.       nl();
  344.       mpu(60);
  345.       input(why_desired[5],60);
  346.       nl();
  347.       mpu(60);
  348.       input(why_desired[6],60);
  349.       nl();
  350.       outstr(getstring(1723));
  351.       nl();
  352.       mpu(60);
  353.       input(why_deserved[5],60);
  354.       nl();
  355.       mpu(60);
  356.       input(why_deserved[6],60);
  357.       strcat(s,"9Wants : X-fer access : 3Prog");
  358.       strcat(s,c);
  359.       strcat(s,"9Why Desired  : 3");
  360.       strcat(s,why_desired[5]);
  361.       strcat(s,c);
  362.       strcat(s,"               ");
  363.       strcat(s,why_desired[6]);
  364.       strcat(s,c);
  365.       strcat(s,"9Why Deserved : 3");
  366.       strcat(s,why_deserved[5]);
  367.       strcat(s,c);
  368.       strcat(s,"               ");
  369.       strcat(s,why_deserved[6]);
  370.       strcat(s,c);
  371.     }
  372.     ssm(1,0,s);
  373.   }
  374.   outstr(getstring(1728));
  375. }
  376.