home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / vmsnet / sources / 306 < prev    next >
Encoding:
Internet Message Format  |  1992-08-21  |  46.8 KB

  1. Path: sparky!uunet!elroy.jpl.nasa.gov!sdd.hp.com!network.ucsd.edu!mvb.saic.com!vmsnet-sources
  2. From: munroe@dmc.com (Dick Munroe)
  3. Newsgroups: vmsnet.sources
  4. Subject: UBBS, part 04/12
  5. Message-ID: <7868458@MVB.SAIC.COM>
  6. Date: Fri, 21 Aug 1992 20:19:46 GMT
  7. Organization: Doyle, Munroe Consultants, Inc., Hudson, MA
  8. Lines: 1577
  9. Approved: Mark.Berryman@Mvb.Saic.Com
  10.  
  11. Submitted-by: munroe@dmc.com (Dick Munroe)
  12. Posting-number: Volume 3, Issue 112
  13. Archive-name: ubbs/part04
  14. -+-+-+-+-+-+-+-+ START OF PART 4 -+-+-+-+-+-+-+-+
  15. X`09    go to 10
  16. X`09end if
  17. X900`09continue
  18. X`09end
  19. X`0C
  20. X`09subroutine aging
  21. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  22. Vcccc
  23. Xc
  24. Xc`09UBBS utilities - AGING.FOR
  25. Xc`09This program allows deletion of users before a specified date.
  26. Xc`09Dale Miller - UALR
  27. Xc`0905-Mar-1986
  28. Xc`09Rev. 4.5  - 03-Oct-1986
  29. Xc
  30. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  31. Vcccc
  32. X`09implicit none
  33. X`09include 'bbs_inc.for'
  34. X`09include 'sys$library:foriosdef/nolist'
  35. X
  36. X`09integer app,nap
  37. X`09character*30 time,my_date
  38. X`09character*1 da,dn
  39. X`09real*8 long_ago,never
  40. X`09real*8 his_login
  41. X`09integer istat,len,sys$asctim,sys$bintim,str$upcase
  42. X`09integer compquad
  43. X`09external uopen
  44. X
  45. X`09character zz*1,appstr*3
  46. X
  47. X 0009`09print*,'Enter date of interest (dd-mmm-yyyy)'
  48. X`09read(5,1001)my_date
  49. X`09istat=str$upcase(my_date,my_date)
  50. X 1001`09format(a)
  51. X`09my_date=my_date(:11)//' 00:00:00.00'
  52. X`09istat = sys$bintim(my_date,long_ago)
  53. X`09istat = sys$asctim(len,time,long_ago,)
  54. X`09print*,'Date is:'//time(:len)//'.  Is this correct?'
  55. X`09read(5,1001)da
  56. X`09istat=str$upcase(da,da)
  57. X`09if(da.ne.'Y') go to 9
  58. X
  59. X`09print*,'Delete authorized before this date?'
  60. X`09read(5,1001)da
  61. X`09istat=str$upcase(da,da)
  62. X`09print*,'Delete non-authorized users before this date?'
  63. X`09read(5,1001)dn
  64. X`09istat=str$upcase(dn,dn)
  65. X
  66. X`09app=0
  67. X`09nap=0
  68. X`09open(unit=1,file='ubbs_data:userlog.dat',status='old',`09
  69. X`091   organization='indexed',access='keyed',useropen=uopen,
  70. X`092   recordtype='fixed',recl=50,shared)
  71. X
  72. X`09ur.user_key='0000000000000000000000000000000000000000'
  73. X`09
  74. X 0010`09read(1,keygt=ur.user_key,iostat=ios) ur
  75. X`09if(ios.eq.for$ios_sperecloc) go to 10
  76. X`09if(ios.ne.0) go to 5000
  77. X`09istat = sys$bintim(ur.last_log_date(1:7)//'19'//
  78. X`091   ur.last_log_date(8:9)//' '//ur.last_log_time//'.00',
  79. X`092   his_login)
  80. X
  81. X`09istat=compquad(long_ago,his_login)
  82. X`09if(istat.eq.-1) go to 10
  83. X 0011`09if(ur.approved) then
  84. X`09    appstr='*A*'
  85. X`09    app=app+1
  86. X`09    if(da.eq.'Y') delete(unit=1)
  87. X`09else
  88. X`09    nap=nap+1
  89. X`09    appstr=' na'
  90. X`09    if(dn.eq.'Y') delete(unit=1)
  91. X`09endif
  92. X`09write(6,1009)ur.user_key,ur.last_log_date,appstr
  93. X`09go to 10
  94. X 1009`09format(1x,a,1x,a,1x,a)
  95. X
  96. X 5000`09close(unit=1)
  97. X`09print*,'app=',app
  98. X`09print*,'nap=',nap
  99. X`09print*,'finished'
  100. X`09return
  101. X
  102. X90500`09print*,'an error has occurred'
  103. X`09return
  104. X`09end
  105. X`0C
  106. X`09subroutine compress(public)
  107. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  108. Vcccc
  109. Xc
  110. Xc`09UBBS utilities - Compress.for
  111. Xc`09This program compresses the message data base eliminating deleted and
  112. Xc`09expired messages as well as private messages which have already been
  113. Xc`09read.
  114. Xc`09Dale Miller - UALR
  115. Xc`0914-Nov-1985
  116. Xc
  117. Xc`09Rev. 3.5  24-Jun-1986
  118. Xc`09Rev. 4.3  26-Jul-1986
  119. Xc`09Rev. 4.10 11-Feb-1987
  120. Xc`09Rev. 7.2  29-Dec-1988
  121. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  122. Vcccc
  123. X`09implicit none
  124. X`09include 'bbs_inc.for'
  125. X`09character*114 dummy
  126. X`09integer*4 zero/0/,one/1/
  127. X`09character line*80,yesno*1,dummy_20*20,cdate*9
  128. X`09include 'sys$library:foriosdef/nolist'
  129. X`09external uopen
  130. X`09integer zlast_header,zlast_data,zfirst_mnum,zlast_mnum
  131. X`09integer current_header,current_data,old_last_header
  132. X`09integer k,l,temp_mail_first,istat,old_message_number,len
  133. X`09integer sys$bintim, compquad, str$upcase, sys$asctim
  134. X`09logical busy,public
  135. X`09real*8 right_now,delete_before, this_message
  136. X
  137. X`09record /mail_header_structure/ mh
  138. X
  139. X 1001`09format(a)
  140. X
  141. X`09call date(cdate)
  142. X`09dummy_20=cdate(1:7)//'19'//cdate(8:9)//' 00:00:00'
  143. X`09istat=sys$bintim(dummy_20,right_now)
  144. X
  145. X`09if (public) then
  146. X 0009`09    print*,'Enter date of earliest public message (dd-mmm-yyyy)'
  147. X`09    read(5,1001)dummy_20
  148. X`09    istat = str$upcase(dummy_20,dummy_20)
  149. X`09    dummy_20 = dummy_20(:11)//' 00:00:00.00'
  150. X`09    istat = sys$bintim(dummy_20, delete_before)
  151. X`09    istat = sys$asctim(len,dummy_20,delete_before,)
  152. X`09    print*,'Date is:'//dummy_20(:len)//'.  Is this correct?'
  153. X`09    read(5,1001)yesno
  154. X`09    istat=str$upcase(yesno,yesno)
  155. X`09    if(yesno.ne.'Y') go to 9
  156. X`09else
  157. X            istat = sys$bintim('17-NOV-1858 00:00:00.00', delete_before)
  158. X`09end if
  159. X
  160. X`09open(unit=2,file='ubbs_data:message.hed',status='old',
  161. X`091    organization='relative',access='direct',shared,
  162. X`092    recordtype='fixed',recl=48,useropen=uopen)
  163. X
  164. X`09open(unit=3,file='ubbs_data:message.dat',status='old',
  165. X`091    organization='relative',access='direct',shared,
  166. X`092    recordtype='fixed',recl=20,useropen=uopen)
  167. X
  168. X 2100`09read(unit=2,rec=1,iostat=ios)last_header,
  169. X`091   last_data,first_mnum,last_mnum,busy
  170. X`09if(ios.ne.0) then
  171. X`09    print*,'Error on header record ios=',ios
  172. X`09    stop
  173. X`09    end if
  174. X`09busy=.true.
  175. X`09write(unit=2,rec=1)last_header,last_data,
  176. X`091   first_mnum,last_mnum,busy
  177. X
  178. X`09print*,'Last header=  ',last_header
  179. X`09print*,'Last data=    ',last_data
  180. X`09print*,'First message=',first_mnum
  181. X`09print*,'Last message= ',last_mnum
  182. X`09zlast_header=last_header
  183. X`09zlast_data=last_data
  184. X`09zfirst_mnum=first_mnum
  185. X`09zlast_mnum=last_mnum
  186. X
  187. X`09current_header=1
  188. X`09current_data=0
  189. X`09old_message_number=1
  190. X
  191. X`09do k=2,max(last_header,1000)
  192. Xc
  193. Xc`09loop through all message headers to see if they are deleted, etc.
  194. Xc
  195. X `09    read(2,rec=k)mh
  196. X
  197. X`09    if(mh.mail_messnum.eq.99999999) go to 30
  198. X`09    if(mh.mail_messnum.le.old_message_number) then
  199. X`09        print*,mh.mail_messnum,' ignored, less than current'
  200. X`09        go to 30
  201. X`09        end if
  202. X
  203. X`09    old_message_number = mh.mail_messnum
  204. X`09    if(mh.mail_deleted) then`09`09!deleted, ignore it
  205. X`09`09print*,mh.mail_messnum,' deleted'
  206. X`09`09go to 30
  207. X`09`09end if
  208. X
  209. X`09    if(mh.mail_private.and.mh.mail_read) then !private and read, ignore i
  210. Vt
  211. X`09`09print*,mh.mail_messnum,' read private'
  212. X`09`09go to 30
  213. X`09`09end if
  214. X
  215. X`09    if(mh.mail_read.and.public) then !public and read, ignore it
  216. X`09`09istat = sys$bintim(mh.mail_date(1:7)//'19'//
  217. X`091`09    mh.mail_date(8:9)//' '//mh.mail_time,
  218. X`092`09    this_message)
  219. X`09`09istat = compquad(this_message, delete_before)
  220. X`09`09if(istat.eq.-1) then
  221. X`09`09    print*,mh.mail_messnum,' read public'
  222. X`09`09    go to 30
  223. X`09`09    end if
  224. X`09`09end if
  225. X
  226. X`09    if(.not.mh.mail_person) then
  227. X`09`09istat=compquad(mh.mail_expire,right_now)
  228. X`09`09if(istat.eq.-1) then
  229. X`09`09    print*,mh.mail_messnum,' expired'
  230. X`09`09    go to 30
  231. X`09`09    end if
  232. X`09`09end if
  233. X
  234. X`09    temp_mail_first=current_data+1`09`09!The data start here
  235. X`09    if(temp_mail_first.ne.mh.mail_first) then
  236. X`09`09do l=mh.mail_first,mh.mail_last
  237. X`09`09    current_data=current_data+1`09`09!Get next record
  238. X `09`09    read(3,rec=l)line`09`09`09!Read it...
  239. X`09`09    write(3,rec=current_data)line`09!...and place it
  240. X`09`09    end do
  241. X`09        mh.mail_first=temp_mail_first`09`09!Get new locations
  242. X`09        mh.mail_last=current_data
  243. X`09    else
  244. X`09`09current_data=mh.mail_last
  245. X`09    end if
  246. X
  247. X`09    current_header=current_header+1`09`09!Compute new header location
  248. X`09    write(2,rec=current_header)mh
  249. X 0030`09    continue
  250. X`09    end do
  251. X
  252. Xc`09Set up to rewrite the header record
  253. X 2400`09continue
  254. X`09read(2,rec=2)mh
  255. X
  256. X`09old_last_header=last_header
  257. X`09last_header=current_header
  258. X`09last_data=current_data
  259. X`09first_mnum=mh.mail_messnum
  260. X
  261. Xc`09blank out the rest of the message headers
  262. X`09print*,'Blanking out headers now.'
  263. X`09mh.mail_to=' '
  264. X`09mh.mail_from=' '
  265. X`09mh.mail_subject=' '
  266. X`09mh.mail_date=' '
  267. X`09mh.mail_time=' '
  268. X`09mh.mail_section=0
  269. X`09mh.mail_first=0
  270. X`09mh.mail_last=0
  271. X`09mh.mail_messnum=99999999
  272. X`09mh.mail_private=.false.
  273. X`09mh.mail_read=.false.
  274. X`09mh.mail_deleted=.true.
  275. X`09mh.mail_person=.false.
  276. X`09mh.mail_reply_to=0
  277. X`09do k=1,10
  278. X`09    mh.mail_replys(k)=0
  279. X`09    end do
  280. X`09do k=last_header+1,max(old_last_header,1000)
  281. X`09    write(2,rec=k)mh
  282. X`09    end do
  283. X
  284. Xc`09now, rewrite the header record.
  285. X
  286. X 2500`09busy=.false.
  287. X`09write(unit=2,rec=1,iostat=ios)last_header,last_data,
  288. X`091   first_mnum,last_mnum,busy
  289. X`09if(ios.eq.for$ios_sperecloc) then
  290. X`09    print*,'Header is locked!'
  291. X`09    go to 2500
  292. X`09    endif
  293. X`09if(ios.ne.0) then
  294. X`09    print*,'Error on header record ios=',ios
  295. X`09    stop
  296. X`09    end if
  297. X`09write(6,1002)
  298. X`09write(6,1003)'Last header=',zlast_header,last_header,
  299. X`091   (zlast_header-last_header)
  300. X`09write(6,1003)'Last data=',zlast_data,last_data,
  301. X`091   (zlast_data-last_data)
  302. X`09write(6,1003)'First message=',zfirst_mnum,first_mnum
  303. X`09write(6,1003)'Last message= ',zlast_mnum,last_mnum
  304. X 1002`09format(17x,'original     new   diff.',/,
  305. X`091      17x,'------------------------')
  306. X 1003`09format(1x,a16,3i8)
  307. Xc`09That's all, folks
  308. X`09close(unit=2)
  309. X`09close(unit=3)
  310. X`09return
  311. X 9060`09print*,'could not open file'
  312. X`09return
  313. X90000`09continue
  314. X`09print*,'Error reading record, ios=',ios
  315. X`09close(unit=2)
  316. X`09close(unit=3)
  317. X`09stop
  318. X`09end
  319. X`0C
  320. X`09subroutine fixcounts
  321. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  322. Vcccc
  323. Xc
  324. Xc`09UBBS utilities - Fixcounts.for
  325. Xc`09This program erases the unread message counts for all users and then
  326. Xc`09fixes them up form the message header file.
  327. Xc`09Dale Miller - UALR
  328. Xc`0902-May-1986
  329. Xc
  330. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  331. Vcccc
  332. X`09implicit none
  333. X`09include 'bbs_inc.for'
  334. X`09character*114 dummy
  335. X`09character first_name*20,last_name*20
  336. X`09include 'sys$library:foriosdef/nolist'
  337. X`09external uopen
  338. X`09integer k,l,spc,str$upcase
  339. X
  340. X
  341. X`09record /mail_header_structure/ mh
  342. X
  343. X`09open(unit=1,file='ubbs_data:userlog.dat',status='old',`09
  344. X`091   organization='indexed',access='keyed',
  345. X`092   recordtype='fixed',recl=50,shared,useropen=uopen)
  346. X
  347. X`09open(unit=2,file='ubbs_data:message.hed',status='old',
  348. X`091    organization='relative',access='direct',shared,
  349. X`092    recordtype='fixed',recl=48,useropen=uopen)
  350. X
  351. X`09ur.user_key='0000000000000000000000000000000000000000'
  352. X`09
  353. X 0010`09read(1,keygt=ur.user_key,iostat=ios) ur
  354. X`09if(ios.ne.0) go to 2100
  355. X`09ur.num_unread = 0
  356. X`09rewrite(unit=1) ur
  357. X`09go to 10
  358. X
  359. X 2100`09continue
  360. X`09print*,'Zeroed all users'
  361. X
  362. X`09read(unit=2,rec=1,iostat=ios)last_header,
  363. X`091   last_data,first_mnum,last_mnum
  364. X`09if(ios.ne.0) then
  365. X`09    print*,'Error on header record ios=',ios
  366. X`09    stop
  367. X`09    end if
  368. X
  369. X`09print*,last_header,' messages to process.'
  370. X`09do k = 1, last_header
  371. X `09    read(2,rec=k)mh
  372. X
  373. X`09    if(mh.mail_person.and.(.not.mh.mail_read).and.
  374. X`091`09(.not.mh.mail_deleted)) then
  375. X
  376. X`09`09l=str$upcase(mh.mail_to,mh.mail_to)
  377. X`09`09spc=index(mh.mail_to,' ')
  378. X`09`09first_name=mh.mail_to(1:spc-1)`09
  379. X`09`09l=spc+1
  380. X`09`09do while(mh.mail_to(l:l).eq.' ')
  381. X`09`09    l=l+1
  382. X`09`09    end do
  383. X`09`09last_name=mh.mail_to(l:30)
  384. X`09`09ur.user_key=last_name//first_name
  385. X`09`09if(l.ne.spc+1) then
  386. X`09`09    mh.mail_to = first_name(1:spc-1)//' '//last_name
  387. X`09`09    write(2,rec=k)mh
  388. X`09`09    print*,'Fixed name on:'//mh.mail_to
  389. X`09`09    end if
  390. X`09`09print*,'updating '//mh.mail_to
  391. X`09`09read(1,key=ur.user_key,iostat=ios)ur
  392. X`09`09if(ios.ne.0) then
  393. X`09`09    mh.mail_deleted=.true.
  394. X`09`09    write(2,rec=k)mh
  395. X`09`09    print*,'Deleted #',mh.mail_messnum,' to '//mh.mail_to
  396. X`09`09else
  397. X`09`09    ur.num_unread=ur.num_unread+1
  398. X`09`09    rewrite(unit=1) ur
  399. X`09            end if
  400. X`09`09end if
  401. X`09    end do
  402. X
  403. X`09close(unit=1)
  404. X`09close(unit=2)
  405. X`09return
  406. X 9060`09print*,'could not open file'
  407. X`09stop
  408. X90000`09continue
  409. X`09print*,'Error reading record, ios=',ios
  410. X`09close(unit=1)
  411. X`09close(unit=2)
  412. X`09stop
  413. X`09end
  414. X`0C
  415. X`09subroutine ulist
  416. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  417. Vcccc
  418. Xc
  419. Xc`09UBBS utilities - Ulist.for
  420. Xc`09This program produces a brief list of all users in the userlog.
  421. Xc`09Dale Miller - UALR
  422. Xc`0905-Mar-1986
  423. Xc
  424. Xc`09Rev. 17-Jun-1986
  425. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  426. Vcccc
  427. X`09implicit none
  428. X`09include 'bbs_inc.for'
  429. X`09include 'sys$library:foriosdef/nolist'
  430. X
  431. X`09character zz*1,appstr*3,ayn*1,uyn*1
  432. X`09integer str$upcase
  433. X`09integer app,nap
  434. X`09external uopen
  435. X
  436. X 1001`09format(a)
  437. X
  438. X`09open(unit=1,file='ubbs_data:userlog.dat',status='old',`09
  439. X`091   organization='indexed',access='keyed',useropen=uopen,
  440. X`092   recordtype='fixed',recl=50,shared)
  441. X
  442. X`09ur.user_key='0000000000000000000000000000000000000000'
  443. X`09app=0
  444. X`09nap=0
  445. X
  446. X`09print*,'List approved users? `5BN`5D'
  447. X`09read(5,1001)ayn
  448. X`09print*,'List unapproved users? `5BN`5D'
  449. X`09read(5,1001)uyn
  450. X`09ios=str$upcase(ayn,ayn)
  451. X`09ios=str$upcase(uyn,uyn)
  452. X`09
  453. X 0010`09read(1,keygt=ur.user_key,iostat=ios) ur
  454. X`09if(ios.eq.for$ios_sperecloc) go to 10
  455. X`09if(ios.ne.0) go to 5000
  456. X`09if(ur.approved) then
  457. X`09    appstr='*A*'
  458. X`09    app=app+1
  459. X`09else
  460. X`09    appstr=' NA'
  461. X`09    nap=nap+1
  462. X`09endif
  463. X`09if(ur.approved.and.(ayn.ne.'Y')) go to 10
  464. X`09if((.not.ur.approved).and.(uyn.ne.'Y')) go to 10
  465. X`09write(6,1000)ur.user_key(1:15)//ur.user_key(21:35),
  466. X`091   ur.city,ur.state,appstr,ur.phone_number(1:3),
  467. X`092   ur.phone_number(4:6),ur.phone_number(7:10)
  468. X 1000`09format(1x,a,a,1x,a,1x,a,1x,a,1x,'(',a,') ',a,'-',a)
  469. X`09go to 10
  470. X
  471. X 5000`09close(unit=1)
  472. X`09print*,' '
  473. X`09print*,'Approved users =',app
  474. X`09print*,'  Non-approved =',nap
  475. X`09print*,'         Total =',nap+app
  476. X`09return
  477. X
  478. X90500`09print*,'an error has occurred'
  479. X`09stop
  480. X`09end
  481. X`0C
  482. X`09subroutine upbull
  483. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  484. Vcccc
  485. Xc
  486. Xc`09UBBS utilities - Upbull.for
  487. Xc`09This program updates the last bulletin number and date.
  488. Xc`09Dale Miller - UALR
  489. Xc`0914-Nov-1985
  490. Xc
  491. Xc`09Rev. 7.3  23-Jan-1989
  492. Xc
  493. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  494. Vcccc
  495. X
  496. X`09implicit none
  497. X`09include 'sys$library:foriosdef/nolist'
  498. X`09include '($rmsdef)'
  499. X`09integer high_bull,ios,user_number
  500. X`09character bull_date*11,user_key*40,filename*60
  501. X`09character zeros*40/'0000000000000000000000000000000000000000'/
  502. X`09integer fsize,compquad,fc1,istat
  503. X`09integer lib$find_file
  504. X`09real*8 rev_date,back_date,last_date
  505. X`09common/filesize/fsize,rev_date,back_date
  506. X
  507. X`09external uopen,getsize
  508. X
  509. X
  510. X`09open(unit=1,file='ubbs_data:userlog.dat',status='old',
  511. X`091    organization='indexed',access='keyed',err=90500,
  512. X`092    recordtype='fixed',recl=50,shared,useropen=uopen)
  513. X
  514. X 1002`09format('ubbs_data:bulletin.',i3.3,';*')
  515. X
  516. X 1000`09read(1,key=zeros,iostat=ios)user_key,user_number,high_bull,
  517. X`091    bull_date
  518. X`09if(ios.eq.for$ios_sperecloc) go to 1000
  519. X`09if(ios.ne.0) go to 90500
  520. X`09print*,'highest=',high_bull,' date=',bull_date
  521. X
  522. X`09high_bull = 1
  523. X`09fc1=0
  524. X`09write(filename,1002)high_bull
  525. X`09istat=lib$find_file(filename,filename,fc1)
  526. X`09do while(istat.eq.rms$_normal)
  527. X`09    open(unit=4,file=filename,status='old',readonly,shared,
  528. X`091`09useropen=getsize)
  529. X`09    close(unit=4)
  530. X`09    istat = compquad(last_date,rev_date)
  531. X`09    if(istat.eq.-1) last_date = rev_date
  532. X`09    fc1=0
  533. X`09    high_bull = high_bull + 1
  534. X`09    filename = ' '
  535. X`09    write(filename,1002)high_bull
  536. X`09    istat=lib$find_file(filename,filename,fc1)
  537. X`09    end do
  538. X`09high_bull = high_bull - 1
  539. X
  540. X`09call sys$asctim(,bull_date,last_date,)
  541. X
  542. X`09print*,'highest=',high_bull,' date=',bull_date
  543. X`09rewrite(1,err=90500)user_key,user_number,high_bull,
  544. X`091    bull_date
  545. X`09close (unit=2)
  546. X`09return
  547. X 0010`09format(a)
  548. X90500`09print*,'aborted'
  549. X`09stop
  550. X`09end
  551. X`0C
  552. X`09subroutine update_files
  553. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  554. Vcccc
  555. Xc
  556. Xc`09UBBS utilities - Update_files.for
  557. Xc`09This program allows interactive updating of the FILES.IDX files.
  558. Xc`09Dale Miller - UALR
  559. Xc`09Rev. 4.1  07-Jul-1986
  560. Xc`09Rev. 4.5  26-Sep-1986
  561. Xc`09Rev. 4.11 05-Mar-1987
  562. Xc`09Rev. 4.12 11-Jun-1987
  563. Xc`09Rev. 6.2  26-Jul-1988
  564. Xc
  565. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  566. Vcccc
  567. X`09implicit none
  568. X`09include 'bbs_inc.for'
  569. X`09include '($rmsdef)'
  570. X`09character filename*100,types*1,section*3,do_section*1
  571. X`09integer d1,d2,dummy,istat
  572. X`09integer find_file,find_next,fc,str$upcase
  573. X
  574. X`09close(unit=6)
  575. X`09open(unit=6,recl=1024,status='unknown',carriagecontrol='none')
  576. X`09crlf=char(13)//char(10)//'  '
  577. X`09cl=2
  578. X`09tnext=1
  579. X`09call fake_vaxnet
  580. X`09call setup_local(.true.)
  581. X`09sysop2=.true.
  582. X`09write(6,1001)crlf(:cl)//
  583. X`091   'View (A)ll or (U)napproved files? `5BU`5D'
  584. X`09dummy=1
  585. X`09call get_upcase_string(types,dummy)
  586. X`09write(6,1001)crlf(:cl)//
  587. X`091   '(A)ll or (S)elected sections? `5BA`5D'
  588. X`09dummy=1
  589. X`09call get_upcase_string(do_section,dummy)
  590. X`09if(do_section.ne.'S') then
  591. X`09    filename='ubbs_files:`5B000000`5D*.dir;*'
  592. X`09    call str$trim(filename,filename,dummy)
  593. X`09    istat=find_file(filename,dummy,fc)
  594. X`09    do while (istat.ne.rms$_nmf)
  595. X`09`09d1=1
  596. X`09`09do while(d1.ne.0)
  597. X`09`09    d1=index(filename,'`5D')
  598. X`09`09    filename=filename(d1+1:)
  599. X`09`09    end do
  600. X`09`09d2=index(filename,'.')-1
  601. X`09`09write(6,1001)crlf(:cl)//crlf(:cl)//
  602. X`091`09    'UF - Beginning '//filename(:d2)
  603. X`09`09call update_index(filename(:d2),types)
  604. X`09`09istat=find_next(filename,dummy,fc)
  605. X`09`09end do
  606. X`09else
  607. X`09    section='XXX'
  608. X`09    do while(section.ne.'   ')
  609. X`09`09write(6,1001)crlf(:cl)//
  610. X`091`09    'Which section? `5Bexit`5D'
  611. X`09`09dummy=3
  612. X`09`09call get_uplow_string(section,dummy)
  613. X`09`09istat = str$upcase(section,section)
  614. X`09`09if(dummy.ne.0) then
  615. X`09`09    call update_index(section,types)
  616. X`09`09else
  617. X`09`09    section='   '
  618. X`09`09end if
  619. X`09`09end do
  620. X`09end if
  621. X`09call setup_local(.false.)
  622. X 1001`09format(a)
  623. X`09return
  624. X`09end
  625. X`0C
  626. X`09subroutine update_index(darea,types)
  627. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  628. Vcccc
  629. Xc
  630. Xc`09UBBS subroutines
  631. Xc`09This routine will allow updating of the download directory
  632. Xc`09Dale Miller - UALR
  633. Xc
  634. Xc
  635. Xc`09Rev. 4.0  30-Jun-1986
  636. Xc`09Rev. 4.2  20-Jul-1986
  637. Xc`09Rev. 4.9  10-Feb-1987
  638. Xc`09Rev. 4.14 14-Jul-1987
  639. Xc`09Rev. 5.3  28-Oct-1987
  640. Xc`09Rev. 6.0  06-Jun-1988
  641. Xc`09Rev. 7.2  02-Jan-1989
  642. Xc
  643. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  644. Vcccc
  645. X`09implicit none
  646. X`09include 'bbs_inc.for'
  647. X`09character*(*) darea
  648. X`09character cdate*11,cdate2*11,filtyp*6,startoff*18,types*1,cdummy*1
  649. X`09character temptext*400,rename*100,yn*3
  650. X`09integer length,dummy
  651. X`09real*8 long_ago
  652. X
  653. X`09integer istat,keyln,len,j,k
  654. X`09integer compquad
  655. X`09integer sys$asctim,sys$bintim,str$upcase,str$trim
  656. X`09integer sys$gettim,lib$rename_file,lib$delete_file
  657. X`09integer array_edit
  658. X`09external uopen
  659. X
  660. X`09record/file_description/ fd
  661. X
  662. Xc`09Open the indexed file for updating.
  663. X`09open(unit=4,`09`09shared,
  664. X`091   file='ubbs_files:`5B'//darea//'`5Dfiles.idx',
  665. X`092   status='old',`09organization='indexed',
  666. X`093   access='keyed',`09form='unformatted',
  667. X`094   recl=192,`09`09recordtype='variable',
  668. X`095`09`09`09key=(1:18:character),
  669. X`096   useropen=uopen)
  670. X
  671. X`09fd.file_name='$Header'
  672. X`09read(4,key=fd.file_name,err=100)fd
  673. Xc`09Now, see if he is allowed to do this.
  674. X`09if(sysop2) go to 0090
  675. X`09if((mail_name.eq.fd.upload_name) .or.
  676. X`091   (mail_name.eq.fd.upload_text(1:30)).or.
  677. X`092   (mail_name.eq.fd.upload_text(31:60))) go to 0090
  678. X`09return`09`09`09! He didn't pass.  return him with no message.
  679. X 0090`09istat = sys$asctim(,cdate,fd.upload_date,)
  680. X
  681. X`09cdate(5:5)=char(ichar(cdate(5:5))+32)
  682. X`09cdate(6:6)=char(ichar(cdate(6:6))+32)
  683. X`09write(6,1001)crlf(:cl)//'Last file added: '//cdate
  684. X`09if(types.eq.'X') then
  685. X`09    write(6,1001)crlf(:cl)//
  686. X`091`09'View (A)ll or (U)napproved files? `5BU`5D'
  687. X`09    dummy=1
  688. X`09    call get_upcase_string(types,dummy)
  689. X`09end if
  690. X
  691. X`09if(types.eq.'A') then
  692. X`09    write(6,1001)crlf(:cl)//'Enter earliest date of files you'//
  693. X`091`09' wish to see.'//crlf(:cl)//
  694. X`092`09'The date must be dd-mmm-yyyy (e.g. 19-APR-1986)'//
  695. X`093`09crlf(:cl)//'Or enter <cr> for a all dates.'//
  696. X`094`09crlf(:cl)//'?'
  697. X`09    dummy=11
  698. X`09    call get_uplow_string(cdate,dummy)
  699. X`09    if(dummy.eq.0) cdate='01-JUL-1985'
  700. X`09    write(6,1001)crlf(:cl)//
  701. X`091`09'Enter the starting file name or <cr> for beginning :'
  702. X`09    dummy=18
  703. X`09    startoff=' '
  704. X`09    call get_filnam_string(startoff,dummy)
  705. X`09else
  706. X`09    cdate='01-JUL-1985'
  707. X`09    startoff=' '
  708. X`09end if
  709. X
  710. X`09istat=str$upcase(cdate,cdate)
  711. X`09istat = sys$bintim(cdate//' 00:00:00.00',long_ago)
  712. X`09istat = sys$asctim(,cdate,long_ago,)
  713. X
  714. X`09if(startoff.eq.' ') startoff='.'
  715. X`09cdate(5:5)=char(ichar(cdate(5:5))+32)
  716. X`09cdate(6:6)=char(ichar(cdate(6:6))+32)
  717. X`09write(6,1001)crlf(:cl)//'    Files since: '//cdate
  718. X`09call ctrl_o_check(*10,*10)
  719. X
  720. X`09call ctrl_o_check(*10,*10)
  721. X
  722. X 0100`09fd.file_name=startoff
  723. X`09fd.upload_text=' '
  724. X`09read(4,keygt=fd.file_name,iostat=ios)fd
  725. X`09do while (ios.eq.0)
  726. X`09    call ctrl_o_check(*10,*10)
  727. X`09    if((fd.file_type.eq.'A'.or.fd.file_type.eq.'B').and.types.ne.'A')
  728. X`091`09go to 110
  729. X`09    istat=compquad(fd.upload_date,long_ago)
  730. X`09    if(istat.eq.-1) go to 110
  731. X`09    istat = sys$asctim(,cdate,fd.upload_date,)
  732. X`09    cdate(5:5)=char(ichar(cdate(5:5))+32)
  733. X`09    cdate(6:6)=char(ichar(cdate(6:6))+32)
  734. X`09    istat = sys$asctim(,cdate2,fd.download_date,)
  735. X`09    cdate2(5:5)=char(ichar(cdate2(5:5))+32)
  736. X`09    cdate2(6:6)=char(ichar(cdate2(6:6))+32)
  737. X`09    if (fd.archived) then
  738. X`09`09yn = 'Yes'
  739. X`09    else
  740. X`09`09yn = 'No'
  741. X`09    end if
  742. X 0105`09    continue
  743. X`09    istat=str$trim(fd.keywords,fd.keywords,keyln)
  744. X`09    if(fd.file_type.eq.'A') then
  745. X`09`09filtyp='Ascii '
  746. X`09    else if(fd.file_type.eq.'B') then
  747. X`09`09filtyp='Binary'
  748. X`09    else if(fd.file_type.eq.'U') then
  749. X`09`09filtyp='Uascii'
  750. X`09    else if(fd.file_type.eq.'V') then
  751. X`09`09filtyp='Ubinary'
  752. X`09    else
  753. X`09`09filtyp='??????'
  754. X`09    end if
  755. X`09    write(6,1002)crlf(:cl)//fd.file_name,cdate,
  756. X`091`09fd.file_size,filtyp,fd.times_down,crlf(:cl),
  757. X`092`09cdate2,yn,crlf(:cl)//crlf(:cl),
  758. X`093`09fd.keywords(:keyln),fd.upload_name//crlf(:cl)
  759. X
  760. X`09    temptext=fd.upload_text
  761. X`09    istat=index(temptext,char(cr))
  762. X`09    do while(istat.ne.0)
  763. X`09`09write(6,1001)crlf(:cl)//temptext(:istat-1)
  764. X`09`09call ctrl_o_check(*10,*10)
  765. X`09`09temptext=temptext(istat+1:)
  766. X`09`09istat=index(temptext,char(cr))
  767. X`09`09end do
  768. X`09    write(6,1001)crlf(:cl)//'Command?'
  769. X`09    dummy=1
  770. X`09    call get_uplow_string(cdummy,dummy)
  771. X`09    istat=str$upcase(cdummy,cdummy)
  772. X`09    if(cdummy.eq.'A') then
  773. X`09`09if(fd.file_type.eq.'U') fd.file_type='A'
  774. X`09`09if(fd.file_type.eq.'V') fd.file_type='B'
  775. X`09`09call sys$gettim(fd.download_date)
  776. X`09`09go to 105
  777. X`09    else if(cdummy.eq.'U') then
  778. X`09`09if(fd.file_type.eq.'A') fd.file_type='U'
  779. X`09`09if(fd.file_type.eq.'B') fd.file_type='V'
  780. X`09`09go to 105
  781. X`09    else if(cdummy.eq.'W') then
  782. X`09`09rewrite(4)fd
  783. X`09`09write(6,1001)crlf(:cl)//'Record written'
  784. X`09`09startoff=fd.file_name
  785. X`09`09fd.file_name='$Header'
  786. X`09`09read(4,key=fd.file_name,err=100)fd
  787. X`09`09istat = sys$gettim(fd.upload_date)
  788. X`09`09rewrite(4)fd
  789. X`09`09fd.file_name=startoff
  790. X`09    else if(cdummy.eq.'D') then
  791. X`09`09delete(unit=4)
  792. X`09`09if((fd.file_type.eq.'A').or.(fd.file_type.eq.'U')) then
  793. X`09`09    filtyp='ASC'
  794. X`09`09else
  795. X`09`09    filtyp='BIN'
  796. X`09`09end if
  797. X`09`09temptext='ubbs_files:`5B'//darea//'.'//filtyp(1:3)//'`5D'//
  798. X`091`09    fd.file_name
  799. X`09`09call str$trim(temptext,temptext,istat)
  800. X`09`09temptext(istat+1:)=';*'
  801. X`09`09istat=lib$delete_file(temptext(1:istat+2))
  802. X`09`09print*,'Deleted'
  803. X`09    else if(cdummy.eq.'E') then
  804. X`09`09message(1)=fd.upload_name
  805. X`09`09message(2)=fd.keywords
  806. X`09`09length=2
  807. X`09`09temptext=fd.upload_text
  808. X`09`09istat=index(temptext,char(cr))
  809. X`09`09do while(istat.ne.0)
  810. X`09`09    length=length+1
  811. X`09`09    message(length)=temptext(:istat-1)
  812. X`09`09    temptext=temptext(istat+1:)
  813. X`09`09    istat=index(temptext,char(cr))
  814. X`09`09    end do
  815. X`09`09call setup_local(.false.)
  816. X`09`09istat=array_edit(message,length,80,20)
  817. X`09`09call setup_local(.true.)
  818. X`09`09fd.upload_name=message(1)
  819. X`09`09fd.keywords=message(2)
  820. X`09`09j=1
  821. X`09`09k=2
  822. X`09`09temptext=' '
  823. X`09`09do while(k.lt.length)
  824. X`09`09    k=k+1
  825. X`09`09    istat=str$trim(message(k),message(k),len)
  826. X`09`09    temptext(j:len+j-1)=message(k)(1:len)
  827. X`09`09    j=j+len+1
  828. X`09`09    temptext(j-1:j-1)=char(cr)
  829. X`09`09    end do
  830. X`09`09fd.upload_text=temptext
  831. X`09`09go to 105
  832. X`09    else if(cdummy.eq.'R') then
  833. X`09`09if((fd.file_type.eq.'A').or.(fd.file_type.eq.'U')) then
  834. X`09`09    filtyp='ASC'
  835. X`09`09else
  836. X`09`09    filtyp='BIN'
  837. X`09`09end if
  838. X`09`09write(6,1001)crlf(:cl)//'Rename to?'
  839. X`09`09length=18
  840. X`09`09call get_filnam_string(rename,length)
  841. X`09`09if(length.eq.0) then
  842. X`09`09    write(6,1001)crlf(:cl)//'Rename aborted.'
  843. X`09`09    go to 105
  844. X`09`09    end if
  845. X`09`09startoff=fd.file_name
  846. X`09`09read(4,key=rename,iostat=istat)fd
  847. X`09`09if(istat.eq.1) then
  848. X`09`09    write(6,1001)crlf(:cl)//'That name is in use'
  849. X`09`09    go to 105
  850. X`09`09    end if
  851. X`09`09if(index(rename(1:length),'.').eq.0) then
  852. X`09`09    length=length+1
  853. X`09`09    rename(length:length)='.'
  854. X`09`09    endif
  855. X`09`09read(4,key=startoff)fd
  856. X`09`09temptext='ubbs_files:`5B'//darea//'.'//filtyp(1:3)//'`5D'
  857. X`09`09istat=str$trim(temptext,temptext,len)
  858. X`09`09rename=temptext(1:len)//rename
  859. X`09`09temptext(len+1:)=fd.file_name
  860. X`09`09istat=lib$rename_file(temptext(1:100),rename)
  861. X`09`09delete(unit=4)
  862. X`09`09if (rename(length+len:length+len).eq.'.') then
  863. X`09`09    fd.file_name=rename(len+1:len+length-1)
  864. X`09`09else
  865. X`09`09    fd.file_name=rename(len+1:)
  866. X`09`09endif
  867. X`09`09write(4,iostat=k)fd
  868. X`09`09if(istat.ne.1.or.k.ne.0) then
  869. X`09`09    write(6,1004)crlf(:cl)//
  870. X`091`09`09'Rename failed - Status ',istat,k
  871. X`09`09    write(6,1001)crlf(:cl)//'From='//temptext(1:100)
  872. X`09`09    write(6,1001)crlf(:cl)//'  To='//rename
  873. X`09`09else
  874. X`09`09    write(6,1001)crlf(:cl)//'Rename successful'
  875. X`09`09end if
  876. X`09`09startoff=temptext(len+1:)
  877. X`09`09fd.file_name='$Header'
  878. X`09`09read(4,key=fd.file_name,err=100)fd
  879. X`09`09istat = sys$gettim(fd.upload_date)
  880. X`09`09rewrite(4)fd
  881. X`09`09fd.file_name=startoff
  882. X`09    else if(cdummy.eq.'M') then
  883. X`09`09if(fd.archived) then
  884. X`09`09    print*,'Cannot move an archived file'
  885. X`09`09    go to 105
  886. X`09`09    end if
  887. X`09`09if((fd.file_type.eq.'A').or.(fd.file_type.eq.'U')) then
  888. X`09`09    filtyp='ASC'
  889. X`09`09else
  890. X`09`09    filtyp='BIN'
  891. X`09`09end if
  892. X`09`09write(6,1001)crlf(:cl)//'Move to? `5Bquit`5D'
  893. X`09`09length=18
  894. X`09`09call get_filnam_string(rename,length)
  895. X`09`09if(length.eq.0) then
  896. X`09`09    write(6,1001)crlf(:cl)//'Move aborted.'
  897. X`09`09    go to 105
  898. X`09`09    end if
  899. X`09`09open(unit=7,`09`09shared,
  900. X`091`09file='ubbs_files:`5B'//rename(1:3)//'`5Dfiles.idx',
  901. X`092`09status='old',`09`09organization='indexed',
  902. X`093`09access='keyed',`09`09form='unformatted',
  903. X`094`09recl=192,`09`09recordtype='variable',
  904. X`095`09key=(1:18:character),`09useropen=uopen,
  905. X`096`09iostat = istat)
  906. X`09`09if(istat.ne.0) then
  907. X`09`09    call lib$signal(%val(istat))
  908. X`09`09    print*,'That is not a valid file section'
  909. X`09`09    go to 105
  910. X`09`09    end if
  911. X`09`09startoff=fd.file_name
  912. X`09`09read(7,key=fd.file_name,iostat=istat)fd
  913. X`09`09if(istat.eq.1) then
  914. X`09`09    write(6,1001)crlf(:cl)//'That name is in use is the '//
  915. X`091`09`09rename(1:3)//' section.'
  916. X`09`09    close(unit=7)
  917. X`09`09    go to 105
  918. X`09`09    end if
  919. X`09`09read(4,key=startoff)fd
  920. X`09`09write(7,iostat=k)fd
  921. X`09`09delete(unit=4)
  922. X
  923. X`09`09temptext='ubbs_files:`5B'//darea//'.'//filtyp(1:3)//'`5D'//
  924. X`091`09    fd.file_name
  925. X`09`09istat=str$trim(temptext,temptext,len)
  926. X`09`09rename=temptext(1:12)//rename(1:3)//temptext(16:)
  927. X`09`09istat=lib$rename_file(temptext(1:len),rename)
  928. X`09`09if(istat.ne.1.or.k.ne.0) then
  929. X`09`09    write(6,1004)crlf(:cl)//
  930. X`091`09`09'Move failed - Status ',istat,k
  931. X`09`09    write(6,1001)crlf(:cl)//'From='//temptext(1:len)
  932. X`09`09    write(6,1001)crlf(:cl)//'  To='//rename(1:len)
  933. X`09`09else
  934. X`09`09    write(6,1001)crlf(:cl)//'Move successful'
  935. X`09`09end if
  936. X`09`09startoff=fd.file_name
  937. X`09`09fd.file_name='$Header'
  938. X`09`09read(7,key=fd.file_name,err=100)fd
  939. X`09`09istat = sys$gettim(fd.upload_date)
  940. X`09`09rewrite(7)fd
  941. X`09`09close(unit=7)
  942. X`09`09fd.file_name=startoff
  943. X`09    else if(cdummy.eq.'X'.or.dummy.eq.-1) then
  944. X`09`09close(unit=4)
  945. X`09`09return
  946. X`09    else if(cdummy.eq.'?') then
  947. X`09`09write(6,1001)crlf(:cl)//'A - Approve'
  948. X`09`09write(6,1001)crlf(:cl)//'D - Delete'
  949. X`09`09write(6,1001)crlf(:cl)//'E - Edit'
  950. X`09`09write(6,1001)crlf(:cl)//'M - Move to another section'
  951. X`09`09write(6,1001)crlf(:cl)//'R - Rename'
  952. X`09`09write(6,1001)crlf(:cl)//'U - Unapprove'
  953. X`09`09write(6,1001)crlf(:cl)//'W - Write'
  954. X`09`09write(6,1001)crlf(:cl)//'X - Exit'
  955. X`09    end if
  956. X`09   `20
  957. X 0110`09    fd.upload_text=' '
  958. X`09    read(4,keygt=fd.file_name,iostat=ios)fd
  959. X`09    end do
  960. X 0010`09close(unit=4)
  961. X`09return
  962. X 1001`09format(a)
  963. X 1002`09format(a18,5x,a11,2x,'Size:'i6,2x,a6,4x,'Accesses:',i5,a,9x,
  964. X`091   'Downloaded: ',a,'  Archived:  ',a,a,
  965. X`092   'Keywords: ',a,' By:',a)
  966. X 1003`09format(q,a)
  967. X 1004`09format(a,z8,',',z8)
  968. X`09end
  969. X`0C
  970. X`09subroutine upuser
  971. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  972. Vcccc
  973. Xc
  974. Xc`09UBBS utilities - Upuser.for
  975. Xc`09This program allows interactive updating of the user log.
  976. Xc`09As an option, it will check for cities not currently recognized in
  977. Xc`09the user log.  This is for people who like for the user list`20
  978. Xc`09to look pretty.
  979. Xc`09Dale Miller - UALR
  980. Xc`09Rev. 4.1  07-Jul-1986
  981. Xc`09Rev. 4.5  03-Oct-1986
  982. Xc`09Rev. 4.10 25-Feb-1987
  983. Xc`09Rev. 4.11 26-May-1987
  984. Xc`09Rev. 5.1  03-Oct-1987
  985. Xc`09Rev. 5.4a 04-Jan-1988
  986. Xc`09Rev. 5.6a 28-Mar-1988
  987. Xc`09Rev. 5.6b 29-May-1988
  988. Xc`09Rev. 7.3a 31-Jan-1989
  989. Xc
  990. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  991. Vcccc
  992. X`09implicit none
  993. X`09include 'bbs_inc.for'
  994. X`09include 'sys$library:foriosdef/nolist'
  995. X`09integer istat,i,str$upcase
  996. X
  997. X`09parameter city_max = 500
  998. X`09parameter nick_max = 20
  999. X`09character  zz*2,appstr*12,fc*1
  1000. X`09character*20 cities(city_max),nick_city(nick_max),nick_name(nick_max)
  1001. X`09character*20 tcity1,tcity2
  1002. X`09integer*2 city_count(city_max)
  1003. X`09character*40 zeros/'0000000000000000000000000000000000000000'/
  1004. X`09character*40 spaces/' '/
  1005. X`09logical do_city,space
  1006. X`09integer num_cities,num_nick
  1007. X`09external uopen
  1008. X
  1009. X
  1010. X 1001`09format(a)
  1011. X 1002`09format(i6)
  1012. X 1003`09format(a20,i5)
  1013. X 1004`09format(a20,1x,a20)
  1014. X`09open(unit=1,file='ubbs_data:userlog.dat',status='old',`09
  1015. X`091   organization='indexed',access='keyed',useropen=uopen,
  1016. X`092   recordtype='fixed',recl=50,shared)
  1017. X
  1018. X
  1019. X`09print*,'(C)ities or (A)ll? `5BA`5D'
  1020. X`09read(5,1001)zz
  1021. X`09istat=str$upcase(zz,zz)
  1022. X`09if(zz.ne.'C') then
  1023. X`09    do_city=.false.
  1024. X`09else
  1025. X`09    fc=' '
  1026. X`09    do_city=.true.
  1027. X`09    open(unit=2,file='ubbs_data:cities.dat',status='old')
  1028. X`09    ios=0
  1029. X`09    num_cities=0
  1030. X`09    do while(ios.eq.0)
  1031. X`09`09num_cities=num_cities+1
  1032. X`09`09if(num_cities.gt.city_max) then
  1033. X`09`09    print*,'UPUSER aborted - insufficient table space.'
  1034. X`09`09    print*,'Increase size of CITY_MAX and rerun.'
  1035. X`09`09    stop
  1036. X                    end if
  1037. X`09`09read(2,1003,iostat=ios)cities(num_cities)
  1038. X`09`09city_count(num_cities)=0
  1039. X`09`09end do
  1040. X`09    num_cities=num_cities-1
  1041. X`09    print*,num_cities,' cities read'
  1042. X`09    close(unit=2)
  1043. X
  1044. X`09    open(unit=2,file='ubbs_data:city_nick.dat',status='old',
  1045. X`091`09iostat=ios)
  1046. X`09    num_nick=0
  1047. X`09    do while(ios.eq.0)
  1048. X`09`09num_nick=num_nick+1
  1049. X`09`09if(num_nick.gt.nick_max) then
  1050. X`09`09    print*,'UPUSER aborted - insufficient table space.'
  1051. X`09`09    print*,'Increase size of NICK_MAX and rerun.'
  1052. X`09`09    stop
  1053. X                    end if
  1054. X`09`09read(2,1004,iostat=ios)nick_name(num_nick), nick_city(num_nick)
  1055. X`09`09end do
  1056. X`09    num_nick=num_nick-1
  1057. X`09    close(unit=2)
  1058. X`09    print*,num_nick,' nicknames read'
  1059. X`09end if
  1060. X`09
  1061. X 0009`09ur.user_key=char(0)
  1062. X`09print*,'Enter key:'
  1063. X`09read(5,1001)ur.user_key
  1064. X`09istat=str$upcase(ur.user_key,ur.user_key)
  1065. X`09i=index(ur.user_key,',')
  1066. X`09if(i.ne.0) then
  1067. X`09    ur.user_key=ur.user_key(1:i-1)//spaces(1:21-i)//
  1068. X`091`09ur.user_key(i+1:)
  1069. X`09    endif
  1070. X 0012`09read(1,keyge=ur.user_key,iostat=ios)ur
  1071. X`09if(ios.eq.for$ios_sperecloc) go to 12
  1072. X`09if(ios.ne.0) go to 5000
  1073. X`09if(ur.user_key.eq.zeros) go to 10
  1074. X`09go to 13
  1075. X`09
  1076. X 0010`09read(1,keygt=ur.user_key,iostat=ios)ur
  1077. X`09if(ios.eq.for$ios_sperecloc) go to 10
  1078. X`09if(ios.ne.0) go to 5000
  1079. X`09if(ur.user_key.eq.zeros) go to 10
  1080. X`09if(do_city.and.(ur.user_key(1:1).ne.fc)) then
  1081. X`09    fc=ur.user_key(1:1)
  1082. X`09    write(6,1001) ' UU - Beginning '//fc
  1083. X`09    end if
  1084. X 0013`09if(do_city) then
  1085. X`09    do i=1,num_cities
  1086. X`09`09if(ur.city.eq.cities(i)) then
  1087. X`09`09    city_count(i)=city_count(i)+1
  1088. X`09`09    go to 10
  1089. X`09`09    end if
  1090. X`09`09end do
  1091. X`09    istat=str$upcase(tcity1,ur.city)
  1092. X`09    do i=1,num_cities
  1093. X`09`09istat=str$upcase(tcity2,cities(i))
  1094. X`09`09if(tcity1.eq.tcity2) then
  1095. X`09`09    write(6,*)'Changing '//ur.city//' to '//cities(i)
  1096. X`09`09    ur.city=cities(i)
  1097. X`09`09    city_count(i)=city_count(i)+1
  1098. X`09`09    rewrite(1,err=90500)ur
  1099. X`09`09    go to 10
  1100. X`09`09    end if
  1101. X`09`09end do
  1102. X
  1103. X`09    do i=1,num_nick
  1104. X`09`09if(tcity1.eq.nick_name(i)) then
  1105. X`09`09    write(6,*)'Changing '//ur.city//' to '//nick_city(i)
  1106. X`09`09    ur.city=nick_city(i)
  1107. X`09`09    rewrite(1,err=90500)ur
  1108. X`09`09    go to 13
  1109. X`09`09    end if
  1110. X`09`09end do
  1111. X
  1112. X`09    istat=str$upcase(ur.city,ur.city)
  1113. X`09    space = .false.
  1114. X`09    do i=2,20
  1115. X`09`09if((ur.city(i:i).ge.'A').and.(ur.city(i:i).le.'Z')
  1116. X`091`09    .and.(.not.space)) then
  1117. X`09`09    ur.city(i:i)=char(ichar(ur.city(i:i))+32)
  1118. X`09`09end if
  1119. X`09`09if(ur.city(i:i).eq.' ') then
  1120. X`09`09    space = .true.
  1121. X`09`09else
  1122. X`09`09    space = .false.
  1123. X`09`09end if
  1124. X`09`09end do
  1125. X`09    end if
  1126. X
  1127. X 0011`09if(ur.approved) then
  1128. X`09    appstr='* Approved *'
  1129. X`09else
  1130. X`09    appstr='Not Approved'
  1131. X`09endif
  1132. X
  1133. X`09write(6,1000)ur.user_key,ur.city,ur.state,ur.phone_number(1:3),
  1134. X`091   ur.phone_number(4:6),ur.phone_number(7:10),ur.computer,
  1135. X`092   ur.last_log_date,ur.last_log_time,ur.num_logon,ur.password,
  1136. X`093   appstr,ur.decus_number,ur.company_name
  1137. X
  1138. X 1000`09format(1x,a,1x,a,','a,1x,'(',a,')',a,'-',a,/,
  1139. X`091   1x,a,1x,a,1x,a,i6,1x,a,/,1x,a,1x,i6.6,1x,a)
  1140. X`09read(5,1001,end=5000)zz
  1141. X`09istat=str$upcase(zz,zz)
  1142. X
  1143. Xc`09First, check two character possibilities.
  1144. X`09if(zz.eq.'CN') then
  1145. X`09    print*,'Company name?'
  1146. X`09    read(5,1001)ur.company_name
  1147. X`09    go to 11
  1148. X`09    end if
  1149. X`09if(zz.eq.'CO') then
  1150. X`09    print*,'Computer?'
  1151. X`09    read(5,1001)ur.computer
  1152. X`09    go to 11
  1153. X`09    end if
  1154. X`09if(zz.eq.'DN') then
  1155. X`09    print*,'Decus number?'
  1156. X`09    read(5,1002)ur.decus_number
  1157. X`09    go to 11
  1158. X`09    end if
  1159. X`09if(zz.eq.'PN') then
  1160. X`09    print*,'Phone number?'
  1161. X`09    read(5,1001)ur.phone_number
  1162. X`09    go to 11
  1163. X`09    end if
  1164. X
  1165. Xc`09Then the single character ones.
  1166. X`09if(zz.eq.'A') then
  1167. X`09    ur.approved=.true.
  1168. X`09    go to 11
  1169. X`09    end if
  1170. X`09if(zz.eq.'B') go to 9
  1171. X`09if(zz.eq.'C') then
  1172. X`09    print*,'City?'
  1173. X`09    read(5,1001)ur.city
  1174. X`09    if(ur.city.eq.'l'.or.ur.city.eq.'L') ur.city='Little Rock'
  1175. X`09    if(ur.city.eq.'n'.or.ur.city.eq.'N') ur.city='North Little Rock'
  1176. X`09    if(ur.city.eq.'s'.or.ur.city.eq.'S') ur.city='Sherwood'
  1177. X`09    if(ur.city.eq.'j'.or.ur.city.eq.'J') ur.city='Jacksonville'
  1178. X`09    go to 11
  1179. X`09    end if
  1180. X`09if(zz.eq.'D') then
  1181. X`09    delete(unit=1)
  1182. X`09    go to 10
  1183. X`09    end if
  1184. X`09if(zz.eq.'E') go to 5000
  1185. X`09if(zz.eq.'G') then
  1186. X`09    if(do_city) then
  1187. X`09`09num_cities=num_cities+1
  1188. X`09`09if(num_cities.gt.city_max) then
  1189. X`09`09    print*,'UPUSER aborted - insufficient table space.'
  1190. X`09`09    print*,'Increase size of CITY_MAX and rerun.'
  1191. X`09`09    stop
  1192. X`09`09    end if
  1193. X`09`09cities(num_cities)=ur.city
  1194. X`09`09city_count(num_cities)=1
  1195. X`09`09end if
  1196. X`09    rewrite(1,err=90500)ur
  1197. X`09    go to 10
  1198. X`09    end if
  1199. X`09if(zz.eq.'P') then
  1200. X`09    print*,'Password?'
  1201. X`09    read(5,1001)ur.password
  1202. X`09    istat=str$upcase(ur.password,ur.password)
  1203. X`09    go to 11
  1204. X`09    end if
  1205. X`09if(zz.eq.'S') then
  1206. X`09    print*,'State?'
  1207. X`09    read(5,1001)ur.state
  1208. X`09    istat=str$upcase(ur.state,ur.state)
  1209. X`09    go to 11
  1210. X`09    end if
  1211. X`09if(zz.eq.'U') then
  1212. X`09    ur.approved=.false.
  1213. X`09    go to 11
  1214. X`09    end if
  1215. X`09if(zz.eq.'W') then
  1216. X`09    rewrite(1,err=90500)ur
  1217. X`09    go to 10
  1218. X`09    end if
  1219. X`09if(zz.eq.'Z') then
  1220. X`09    print*,'Time was',ur.seconds_today
  1221. X`09    ur.seconds_today=0
  1222. X`09    go to 11
  1223. X`09    end if
  1224. X`09if(zz.eq.'?') then
  1225. X`09    print*,'Valid options are:'
  1226. X`09    print*,'A  - Approve user'
  1227. X`09    print*,'B  - Beginning of program (re-enter key)'
  1228. X`09    print*,'C  - Change city'
  1229. X`09    print*,'CN - Change company name'
  1230. X`09    print*,'CO - Change computer type'
  1231. X`09    print*,'D  - Delete record'
  1232. X`09    print*,'DN - Change DECUS number'
  1233. X`09    print*,'E  - Exit program'
  1234. X`09    print*,'G  - Accept as good (add city to table and write)'
  1235. X`09    print*,'P  - Change password'
  1236. X`09    print*,'PN - Change phone number'
  1237. X`09    print*,'S  - Change state'
  1238. X`09    print*,'U  - Un-approve user'
  1239. X`09    print*,'W  - Write record'
  1240. X`09    print*,'Z  - Zero time used today'
  1241. X`09    go to 11
  1242. X`09    end if
  1243. X`09if(zz.eq.' ') go to 10
  1244. X`09print*,'Unknown command, type "?" for list'
  1245. X`09go to 11
  1246. X`09
  1247. X
  1248. X
  1249. X 5000`09close(unit=1)
  1250. X`09if(do_city) then
  1251. X`09    open(unit=2,file='ubbs_data:cities.dat',status='new',
  1252. X`091`09carriagecontrol='list')
  1253. X`09    do i=1,num_cities
  1254. X`09    write(2,1003)cities(i),city_count(i)
  1255. X`09    end do
  1256. X`09    close(unit=2)
  1257. X`09    print*,num_cities,' entries in CITIES.DAT'
  1258. X`09    end if
  1259. X`09print*,'finished'
  1260. X`09return
  1261. X
  1262. X90500`09print*,'an error has occurred'
  1263. X`09stop
  1264. X`09end
  1265. X`0C
  1266. X`09subroutine check_files
  1267. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  1268. Vcccc
  1269. Xc
  1270. Xc`09UBBS utilities - Check_files.for
  1271. Xc`09This program removes all files in the files sections that do not
  1272. Xc`09appear in the FILES.IDX files.
  1273. Xc
  1274. Xc`09Dale Miller - UALR
  1275. Xc
  1276. Xc`09Rev. 4.3  07-Aug-1986
  1277. Xc`09Rev. 4.5  26-Sep-1986
  1278. Xc`09Rev. 4.8  09-Feb-1987
  1279. Xc`09Rev. 4.12 11-Jun-1987
  1280. Xc`09Rev. 5.3  28-Oct-1987
  1281. Xc`09Rev. 6.0  06-Jun-1988
  1282. Xc`09Rev. 6.1  08-Jun-1988
  1283. Xc`09Rev. 6.2  26-Jul-1988
  1284. Xc`09Rev. 7.1  19-Sep-1988
  1285. Xc
  1286. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  1287. Vcccc
  1288. X`09implicit none
  1289. X`09include 'bbs_inc.for'
  1290. X`09include '($rmsdef)'
  1291. X`09character filnam1*100,filnam2*100,filnam3*100
  1292. X`09character darea*3,tempfile*50,dsp*1,filetype*1
  1293. X`09logical delflag
  1294. X`09integer d1,d2,dummy,istat,fc1,fc2,du1,du2,i,length
  1295. X`09integer find_file,find_next,lib$delete_file,lib$find_file
  1296. X`09integer array_edit
  1297. X`09integer str$trim,str$upcase,sys$gettim
  1298. X`09integer fsize,rev_date(2),back_date(2)
  1299. X`09common/filesize/fsize,rev_date,back_date
  1300. X
  1301. X`09external uopen,getsize
  1302. X
  1303. X`09record/file_description/ fd
  1304. X
  1305. X`09sysop2 = .true.`09`09`09`09! Allow including files
  1306. X`09print*,'(D)elete or (P)rompt? `5BD`5D'
  1307. X`09read(5,1001)dsp
  1308. X`09istat=str$upcase(dsp,dsp)
  1309. X`09delflag=.false.
  1310. X`09if(dsp.ne.'P') delflag=.true.
  1311. X`09filnam1='ubbs_files:`5B000000`5D*.dir;*'
  1312. X`09call str$trim(filnam1,filnam1,dummy)
  1313. X`09fc1=0
  1314. X`09tempfile=filnam1
  1315. X`09istat=rms$_nmf
  1316. X`09istat=lib$find_file(tempfile,filnam1,fc1)
  1317. X`09do while (istat.ne.rms$_nmf)
  1318. X`09    d1=1
  1319. X`09    do while(d1.ne.0)
  1320. X`09`09d1=index(filnam1,'`5D')
  1321. X`09`09filnam1=filnam1(d1+1:)
  1322. X`09`09end do
  1323. X`09    d2=index(filnam1,'.')-1
  1324. X`09    darea=filnam1(:d2)
  1325. X`09    write(6,1001)' CF - Beginning '//darea
  1326. Xc
  1327. Xc Get the index file.
  1328. Xc
  1329. X`09open(unit=4,`09`09shared,
  1330. X`091   file='ubbs_files:`5B'//darea//'`5Dfiles.idx',
  1331. X`092   status='old',`09organization='indexed',
  1332. X`093   access='keyed',`09form='unformatted',
  1333. X`094   recl=192,`09`09recordtype='variable',
  1334. X`095`09`09`09key=(1:18:character),
  1335. X`096   useropen=uopen)
  1336. X
  1337. X`09filnam2='ubbs_files:`5B'//darea//'.*`5D*.*;*'
  1338. X`09istat=find_file(filnam2,dummy,fc2)
  1339. X`09do while(istat.ne.rms$_nmf)
  1340. X`09    filnam3=filnam2
  1341. X`09    d1=1
  1342. X`09    do while(d1.ne.0)
  1343. X`09`09d1=index(filnam3,'`5D')
  1344. X`09`09if(d1.ne.0) filetype=filnam3(d1-3:d1-3)
  1345. X`09`09filnam3=filnam3(d1+1:)
  1346. X`09`09end do
  1347. X`09    d2=index(filnam3,';')-1
  1348. X`09    fd.file_name=filnam3(:d2)
  1349. X`09    if(filnam3(d2:d2).eq.'.') fd.file_name=filnam3(:d2-1)
  1350. X`09    read(4,key=fd.file_name,iostat=ios)fd
  1351. X`09    if((ios.eq.0).and.fd.archived) then
  1352. X`09`09fd.archived = .false.
  1353. X`09`09rewrite(4) fd
  1354. X`09`09print*,'Resetting ARCHIVE flag on '//fd.file_name
  1355. X`09    else if((ios.ne.0).and.(fd.file_name.ne.'*.*')) then
  1356. X`09`09print*,'File '//fd.file_name//' Type='//filetype
  1357. X`09`09if (.not.delflag) print*,'Disposition?'
  1358. X`09`09dsp='X'
  1359. X`09`09do while(dsp.ne.'A'.and.dsp.ne.'D'.and.dsp.ne.'I')
  1360. X`09`09    if (delflag) then
  1361. X`09`09`09dsp='D'
  1362. X`09`09    else
  1363. X`09`09`09read(5,1001)dsp
  1364. X`09`09    end if
  1365. X`09`09    istat=str$upcase(dsp,dsp)
  1366. X`09`09    if(dsp.eq.'D') then
  1367. X`09`09`09istat=lib$delete_file(filnam2)
  1368. X`09`09`09print*,'File '//fd.file_name//' deleted.'
  1369. X`09`09    else if (dsp.eq.'A') then
  1370. X`09`09`09print*,'File Description?'
  1371. X`09`09`09istat=array_edit(message,length,80,20)
  1372. X`09`09`09du1=1
  1373. X`09`09`09fd.upload_text=' '
  1374. X`09`09`09do i=1,length
  1375. X`09`09`09    istat=str$trim(message(i),message(i),du2)
  1376. X`09`09`09    fd.upload_text(du1:du1+du2)=
  1377. X`091`09`09`09message(i)(:du2)//char(cr)
  1378. X`09`09`09    du1=du1+du2+1
  1379. X`09`09`09    end do
  1380. X`09`09`09print*,'Keywords?'
  1381. X`09`09`09read(5,1001)fd.keywords
  1382. Xc`09Find out how big the file is.  This useropen will put the file
  1383. Xc`09size into fsize.
  1384. X`09`09`09open(unit=17,file=filnam2,status='old',readonly,
  1385. X`091`09`09    useropen=getsize)
  1386. X`09`09`09close(unit=17)
  1387. X`09`09`09fd.file_size=fsize
  1388. X`09`09`09call sys$gettim(fd.upload_date)
  1389. X`09`09`09fd.download_date = fd.upload_date
  1390. X`09`09`09fd.times_down=0
  1391. X`09`09`09print*,'Name?'
  1392. X`09`09`09read(5,1001)fd.upload_name
  1393. X`09`09`09istat=str$upcase(fd.upload_name,fd.upload_name)
  1394. X`09`09`09fd.file_type=filetype
  1395. X`09`09`09fd.archived=.false.
  1396. X`09`09`09write(4)fd
  1397. X`09`09    else if(dsp.eq.'I') then
  1398. X`09`09`09continue
  1399. X`09`09    else
  1400. X`09`09`09print*,'Invalid disposition, A or D allowed'
  1401. X`09`09    end if
  1402. X`09`09    end do
  1403. X`09`09end if
  1404. X`09    istat=find_next(filnam2,dummy,fc2)
  1405. X`09    end do
  1406. X`09    istat=lib$find_file(tempfile,filnam1,fc1)
  1407. X`09    end do
  1408. X 1001`09format(a)
  1409. X`09stop
  1410. X`09end
  1411. X`0C
  1412. X`09subroutine check_indices
  1413. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  1414. Vcccc
  1415. Xc
  1416. Xc`09UBBS utilities - Check_indices.for
  1417. Xc`09This program removes all records in the FILES.IDX that are not actually
  1418. Xc`09present in the files section except those marked ARCHIVED.
  1419. Xc
  1420. Xc`09Dale Miller - UALR
  1421. Xc
  1422. Xc`09Rev. 4.11 05-Mar-1987
  1423. Xc`09Rev. 4.12 11-Jun-1987
  1424. Xc`09Rev. 6.0  06-Jun-1988
  1425. Xc`09Rev. 6.2  26-Jul-1988
  1426. Xc`09Rev. 7.1  19-Sep-1988
  1427. Xc
  1428. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  1429. Vcccc
  1430. X`09implicit none
  1431. X`09include 'bbs_inc.for'
  1432. X`09include '($rmsdef)'
  1433. X`09include 'sys$library:foriosdef.for/nolist'
  1434. X`09character filnam1*100,filnam2*100,darea*3,tempfile*50,dsp*1
  1435. X`09integer d1,d2,dummy,istat,fc1,fc2,du1,du2,i,length
  1436. X`09integer lib$find_file
  1437. X`09integer str$trim,str$upcase,sys$gettim
  1438. X`09external uopen
  1439. X`09record/file_description/ fd
  1440. X
  1441. X`09filnam1='ubbs_files:`5B000000`5D*.dir;*'
  1442. X`09call str$trim(filnam1,filnam1,dummy)
  1443. X`09fc1=0
  1444. X`09tempfile=filnam1
  1445. X`09istat=rms$_nmf
  1446. X`09istat=lib$find_file(tempfile,filnam1,fc1)
  1447. X`09do while (istat.ne.rms$_nmf)
  1448. X`09    d1=1
  1449. X`09    do while(d1.ne.0)
  1450. X`09`09d1=index(filnam1,'`5D')
  1451. X`09`09filnam1=filnam1(d1+1:)
  1452. X`09`09end do
  1453. X`09    d2=index(filnam1,'.')-1
  1454. X`09    darea=filnam1(:d2)
  1455. X`09    write(6,1001)' CI - Beginning '//darea
  1456. Xc
  1457. Xc Get the index file.
  1458. Xc
  1459. X`09open(unit=4,`09`09shared,
  1460. X`091   file='ubbs_files:`5B'//darea//'`5Dfiles.idx',
  1461. X`092   status='old',`09organization='indexed',
  1462. X`093   access='keyed',`09form='unformatted',
  1463. X`094   recl=192,`09`09recordtype='variable',
  1464. X`095`09`09`09key=(1:18:character),
  1465. X`096   useropen=uopen)
  1466. X
  1467. X`09fd.file_name=char(0)
  1468. X`09read(4,keygt=fd.file_name,iostat=ios)fd
  1469. X`09do while(ios.ne.for$ios_attaccnon)
  1470. X`09    if(fd.file_name.eq.'$Header') go to 8888
  1471. X`09    if(fd.archived) go to 8888
  1472. X`09    if(fd.file_type.eq.'A'.or.fd.file_type.eq.'U') then
  1473. X`09`09filnam2='ubbs_files:`5B'//darea//'.ASC`5D'//fd.file_name
  1474. X`09    else
  1475. X`09`09filnam2='ubbs_files:`5B'//darea//'.BIN`5D'//fd.file_name
  1476. X`09    end if
  1477. X`09    istat=lib$find_file(filnam2,filnam2,fc2)
  1478. X`09    if(istat.eq.rms$_fnf) then
  1479. X`09`09print*,fd.file_name//' record deleted.'
  1480. X`09`09delete(unit=4)
  1481. X`09`09end if
  1482. X 8888`09    read(4,keygt=fd.file_name,iostat=ios)fd
  1483. X`09    end do
  1484. X`09    close(unit=4)
  1485. X
  1486. Xc`09Now, go on to the next directory.
  1487. X`09    istat=lib$find_file(tempfile,filnam1,fc1)
  1488. X`09    end do
  1489. X 1001`09format(a)
  1490. X`09stop
  1491. X`09end
  1492. X`0C
  1493. X`09subroutine update_sysops
  1494. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  1495. Vcccc
  1496. Xc
  1497. Xc`09UBBS utilities - Update_sysops.for
  1498. Xc`09This program allows interactive updating of the FILES.IDX files
  1499. Xc`09Dale Miller - UALR
  1500. Xc`09Rev. 4.2  20-Jul-1986
  1501. Xc`09Rev. 4.12 11-Jun-1987
  1502. Xc`09Rev. 6.0  06-Jun-1988
  1503. Xc`09Rev. 6.2  26-Jul-1988
  1504. Xc
  1505. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  1506. Vcccc
  1507. X`09implicit none
  1508. X`09include 'bbs_inc.for'
  1509. X`09include '($rmsdef)'
  1510. X`09character filename*50
  1511. X`09integer d1,d2,dummy,istat
  1512. X`09integer find_file,find_next,fc
  1513. X
  1514. X`09filename='ubbs_files:`5B000000`5D*.dir;*'
  1515. X`09call str$trim(filename,filename,dummy)
  1516. X`09istat=find_file(filename,dummy,fc)
  1517. X`09do while (istat.ne.rms$_nmf)
  1518. X`09    d1=1
  1519. X`09    do while(d1.ne.0)
  1520. X`09`09d1=index(filename,'`5D')
  1521. X`09`09filename=filename(d1+1:)
  1522. X`09`09end do
  1523. X`09    d2=index(filename,'.')-1
  1524. X`09    print*,'Area='//filename(:d2)
  1525. X`09    call make_cosysop(filename(:d2))
  1526. X`09    istat=find_next(filename,dummy,fc)
  1527. X`09    end do
  1528. X 1001`09format(a)
  1529. X`09return
  1530. X`09end
  1531. X`0C
  1532. X`09subroutine make_cosysop(darea)
  1533. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  1534. Vcccc
  1535. Xc
  1536. Xc`09UBBS subroutines
  1537. Xc`09This routine will allow updating of the SYSOPs for download sections.
  1538. Xc`09Dale Miller - UALR
  1539. Xc
  1540. Xc
  1541. Xc`09Rev. 4.2  20-Jul-1986
  1542. Xc
  1543. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  1544. Vcccc
  1545. X`09implicit none
  1546. X`09include 'bbs_inc.for'
  1547. X`09character*(*) darea
  1548. X`09logical done
  1549. X`09integer length
  1550. X`09integer istat
  1551. X`09integer str$upcase
  1552. X`09external uopen
  1553. X
  1554. X`09record/file_description/ fd
  1555. X
  1556. Xc`09Open the indexed file for updating.
  1557. X`09open(unit=4,`09`09shared,
  1558. X`091   file='ubbs_files:`5B'//darea//'`5Dfiles.idx',
  1559. X`092   status='old',`09organization='indexed',
  1560. X`093   access='keyed',`09form='unformatted',
  1561. X`094   recl=192,`09`09recordtype='variable',
  1562. X`095`09`09`09key=(1:18:character),
  1563. X`096   useropen=uopen)
  1564. X
  1565. X`09fd.file_name='$Header'
  1566. X`09read(4,key=fd.file_name)fd
  1567. X`09done=.false.
  1568. X`09do while(.not.done)
  1569. X`09    done=.true.
  1570. X`09    print*,'Sysop1? `5B'//fd.upload_name//'`5D'
  1571. X`09    read(5,1003)length,mail_name
  1572. X`09    if(length.gt.0) then
  1573. X`09`09istat=str$upcase(mail_name,mail_name)
  1574. X`09`09fd.upload_name=mail_name
  1575. X`09`09done=.false.
  1576. X`09`09end if
  1577. X`09    print*,'Sysop2? `5B'//fd.upload_text(1:30)//'`5D'
  1578. X`09    read(5,1003)length,mail_name
  1579. X`09    if(length.gt.0) then
  1580. X`09`09istat=str$upcase(mail_name,mail_name)
  1581. X`09`09fd.upload_text(1:30)=mail_name
  1582. X`09`09done=.false.
  1583. X`09`09end if
  1584. X`09    print*,'Sysop3? `5B'//fd.upload_text(31:60)//'`5D'
  1585. X`09    read(5,1003)length,mail_name
  1586. X`09    if(length.gt.0) then
  1587. +-+-+-+-+-+-+-+-  END  OF PART 4 +-+-+-+-+-+-+-+-
  1588.