allow sysop to see own or all user's logs with the view logs menu
This commit is contained in:
		
							parent
							
								
									0a81988987
								
							
						
					
					
						commit
						6cd3b1e86b
					
				| @ -229,6 +229,18 @@ def delLogBook() : | |||||||
| def viewLogBook() : | def viewLogBook() : | ||||||
|   global db |   global db | ||||||
|   global handle |   global handle | ||||||
|  |   secLevel = mci2str('SL') | ||||||
|  |   filter = handle | ||||||
|  |   if secLevel == "255" : | ||||||
|  |     gotoxy(22,19) | ||||||
|  |     write("View [A]ll or [S]elf only: ") | ||||||
|  |     ch = onekey(chr(13) + 'AS', False) | ||||||
|  |     if ch == "S" : | ||||||
|  |       pass | ||||||
|  |       write("SELF") | ||||||
|  |     if ch == "A" : | ||||||
|  |       filter = "all" | ||||||
|  |       write("ALL") | ||||||
| 
 | 
 | ||||||
|   found = False |   found = False | ||||||
|   num = 0 |   num = 0 | ||||||
| @ -237,7 +249,7 @@ def viewLogBook() : | |||||||
|   writeln(" "+LCYN+"Date".ljust(20)+LGRN+"Callsign".ljust(10)+LYEL+"Name".ljust(20)+LBLU+"RST IN".ljust(8)+LMAG+"RST OUT".ljust(8)+LGRY+"Notes".ljust(12)) |   writeln(" "+LCYN+"Date".ljust(20)+LGRN+"Callsign".ljust(10)+LYEL+"Name".ljust(20)+LBLU+"RST IN".ljust(8)+LMAG+"RST OUT".ljust(8)+LGRY+"Notes".ljust(12)) | ||||||
|   writeln(" "+LBLK+"="*78+DGRY) |   writeln(" "+LBLK+"="*78+DGRY) | ||||||
|   for LOG in sorted(db["logs"], reverse=True) : |   for LOG in sorted(db["logs"], reverse=True) : | ||||||
|     if db["logs"][LOG]["reportedBy"] == handle : |     if (filter == "all") or (db["logs"][LOG]["reportedBy"] == handle) : | ||||||
|       found = True |       found = True | ||||||
|       num += 1 |       num += 1 | ||||||
|       if num % 2 == 0 : |       if num % 2 == 0 : | ||||||
| @ -255,6 +267,9 @@ def viewLogBook() : | |||||||
|       else : |       else : | ||||||
|         notesAvailable = "N/A" |         notesAvailable = "N/A" | ||||||
| 
 | 
 | ||||||
|  |       if secLevel == "255" : | ||||||
|  |         writeln(BG+" "+LCYN+LOG.ljust(20)+LGRN+contactCall.ljust(10)+LYEL+theirName.ljust(20)+LBLU+observedSig.center(8)+LMAG+yourSig.center(8)+LGRY+db["logs"][LOG]["reportedBy"].ljust(12)+BBLK) | ||||||
|  |       else : | ||||||
|         writeln(BG+" "+LCYN+LOG.ljust(20)+LGRN+contactCall.ljust(10)+LYEL+theirName.ljust(20)+LBLU+observedSig.center(8)+LMAG+yourSig.center(8)+LGRY+notesAvailable.ljust(12)+BBLK) |         writeln(BG+" "+LCYN+LOG.ljust(20)+LGRN+contactCall.ljust(10)+LYEL+theirName.ljust(20)+LBLU+observedSig.center(8)+LMAG+yourSig.center(8)+LGRY+notesAvailable.ljust(12)+BBLK) | ||||||
|   writeln("") |   writeln("") | ||||||
|   #writeln(str(db["logs"])) |   #writeln(str(db["logs"])) | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 MeaTLoTioN
						MeaTLoTioN