sub Menu_Config ////////////////////////////////////////////////////////////////////// dim Config_Changed as boolean dim Option as string*1 dim Max_Conf_Areas as integer dim New_Setting as integer ////////////////////////////////////////////////////////////////////// Config_Changed = false do cls ? Copyright ? ? "EVALFILE CONFIGURATION SETTINGS MENU" ? ? "If you change the configuration settings, be sure to save"; ? " them if you " ? "want them to stay changed for the next time EvalFile is run." ? ? "An explanation is given for each setting before you choose"; ? " to set it." ? ? "1 -- Mail Conference = "; Config.Mail_Conference ? "2 -- Bias Count = "; Config.Bias_Count ? "3 -- Cents / Daily Downloads = "; Config.Cents_Per_Daily_Downloads ? "4 -- Max Increase = "; Config.Max_Increase ? "5 -- Max Decrease = "; Config.Max_Decrease ? "D -- set all settings to initial installation Defaults" ? "L -- Load configuration from file" ? "Q -- Quit" ? "S -- Save current configuration settings to file" ? ? "Option: "; input Option ? Option = UCase ( Option ) select case Option case "1" ? "The Mail Conference setting is the conference for all" ? "mail to users and SysOps from EvalFile. I highly" ? "recommend Conference 0." ? Max_Conf_Areas = MakeWild.MaxConfAreas New_Setting = Integer_Ask ( \ "Mail Conference ", 0, Max_Conf_Areas, \ Config.Mail_Conference ) if New_Setting <> Config.Mail_Conference then Config_Changed = true Config.Mail_Conference = New_Setting end if case "2" ? "The Bias Count setting determines how biased the file" ? "ratings will be towards a perfect rating of 1.0." ? ? "If the Bias Count is 1, the ratings will be unbiased but" ? "a good file could drop to 0.0 and never be downloaded" ? "again if its first user evaluation were bad." ? ? "If the Bias Count were higher, such as 30, a poor evaluation" ? "would only drop the rating by 1/30th. The higher your Bias" ? "Count, the slower file ratings sink. After a number of" ? "actual user evaluations equal to your Bias Count setting," ? "the file rating is unbiased." ? ? "A Bias Count of 30 seems statistically significant but you" ? "may want to lower this value if your BBS gets very few downloads." ? New_Setting = Integer_Ask ( \ "Bias Count ", 1, , Config.Bias_Count ) if New_Setting <> Config.Bias_Count then Config_Changed = true Config.Bias_Count = New_Setting end if case "3" ? "The Cents per Daily Downloads setting affects how much the" ? "costs of your files will go up and down based on the expected" ? "number of downloads for a file per day." ? ? "Set this to zero if you are not using user account balances" ? "to charge for files. Note that this is separate from the" ? "file downloads/uploads ratio user limits." ? ? "If the expected number of downloads for a particular file is" ? "one per day and your Cents / Daily Downloads is set to 1," ? "the file cost will be set to 1." ? ? "Set this value to 30 if you want to set the costs of files" ? "to roughly the expected number of downloads per month in" ? "cents. Basically, the higher this setting is, the more" ? "the files will cost." ? New_Setting = Integer_Ask ( \ "Cents / Daily Downloads ", 0, , \ Config.Cents_Per_Daily_Downloads ) if New_Setting <> Config.Cents_Per_Daily_Downloads then Config_Changed = true Config.Cents_Per_Daily_Downloads = New_Setting end if case "4" ? "The Max Increase setting affects how fast the costs of" ? "your files can rise each time maintenance is run, in cents." ? ? "Keep this value reasonably low or you may overcharge." ? "For example, if a new file gets 5 downloads in the first" ? "day when the cost is zero, the expected number of downloads" ? "per month is, falsely, 5 * 30 = 150 which equates to" ? "$1.50 if you have your Cents / Daily Downloads set to 30." ? ? "To keep your file prices reasonable for your users," ? "set this value to a few cents, maybe just one." ? ? "To keep file costs from increasing at all, set this to 0." ? New_Setting = Integer_Ask ( \ "Max Increase ", 0, , Config.Max_Increase ) if New_Setting <> Config.Max_Increase then Config_Changed = true Config.Max_Increase = New_Setting end if case "5" ? "The Max Decrease setting affects how fast the costs of" ? "your files can drop each time maintenance is run, in cents." ? ? "Any positive value is reasonable here, even the largest." ? "However, you may want to keep the Max Decrease small if" ? "you have been manually setting the costs of files that you" ? "know will be popular to some initial reasonable cost." ? "This will avoid your manually set cost from dropping to" ? "zero by a maintenance run before anyone even notices the" ? "hot file has been uploaded." ? ? "Set this value to zero if you want file costs to never decrease." ? New_Setting = Integer_Ask ( \ "Max Decrease ", 0, , Config.Max_Decrease ) if New_Setting <> Config.Max_Decrease then Config_Changed = true Config.Max_Decrease = New_Setting end if case "D" ? "Setting to installation defaults..."; Config_Init ? "done." WaitEnter case "L" ? "Loading..."; Config_Load ? "done." WaitEnter case "Q" exit do case "S" ? "Saving..."; Config_Save ? "done." Config_Changed = false WaitEnter case else Beep end select loop if Config_Changed then ? ? "You have changed your configuration settings." ? "You may save these new settings to a file if you want them to" ? "load as currently set each time you run EvalFile." ? ? "Do you want to save your current configuration settings?"; if InputYesNo ( " (y/N): ", false ) then ? "Saving..."; Config_Save ? "done." WaitEnter end if end if end sub sub Menu_File_Records REM ------------------------------------------------------------------ dim Option as string*1 dim File_Name as string dim Index as long dim Rating as real dim Count as integer dim Paid as long REM do cls ? Copyright ? ? "EVALFILE FILE RECORDS MENU" ? ? "E -- Examine a file record" ? "S -- Statistics for a file record" ? "Q -- Quit" ? ? "Option: "; input Option Option = UCase ( Option ) select case Option case "Q" exit sub case else Beep end select loop end sub sub Menu_Maintenance REM ------------------------------------------------------------------ dim Option as string*1 REM do cls ? Copyright ? ? "EVALFILE MAINTENANCE MENU" ? ? "If EvalFile.WCX is installed as a nightly event," ? "it will perform maintenance unattended." ? ? "A -- All Maintenance" ? "1 -- Activity Log Scan" ? "2 -- Costs Update" ? "3 -- Sort All Files by File Area and Ratings" ? "4 -- Sort Users by Total Uploader Payments" ? "5 -- Delete Data Records for Deleted Users" ? "Q -- Quit" ? ? "Option: "; input Option Option = UCase ( Option ) select case Option case "A" if InputYesNo ( "Automatically log off afterwards? (Y/n): ", true ) then Event_Mode Goodbye else Event_Mode MorePrompt On WaitEnter end if case "1" MorePrompt Off Log_Scan_Start ( Registration, Copyright ) MorePrompt On WaitEnter case "2" MorePrompt Off Costs_Update MorePrompt On WaitEnter case "3" if InputYesNo ( "Automatically log off afterwards? (Y/n): ", true ) then MorePrompt Off Sort_All_Txt_Make AllFiles_Txt_Make // Sort_All_Files Goodbye else MorePrompt Off Sort_All_Txt_Make AllFiles_Txt_Make // Sort_All_Files MorePrompt On WaitEnter end if case "4" MorePrompt Off Uploader_Payments_Total_Sort MorePrompt On WaitEnter case "5" MorePrompt Off UserData_Purge MorePrompt On WaitEnter case "Q" exit sub case else Beep end select loop end sub sub Menu_SysOp dim Option as string REM ------------------------------------------------------------------ if not User_Is_SysOp then ? Beep ? "You must have SysOp status to enter this menu." ? WaitEnter exit sub end if while Option <> "Q" cls ? Copyright ? ? "EVALFILE SYSOP MENU" ? ? "C -- Configuration Settings Menu" ? "F -- File Records Menu" ? "M -- Maintenance Menu" ? "P -- Purge old, low cost, big files" ? "Q -- Quit" ? "T -- Transfer Entire File Areas" ? ? "Option: "; input Option Option = Ucase ( Option ) select case Option case "C" Menu_Config case "F" Menu_File_Records case "M" Menu_Maintenance case "P" Purge_Start ( Registration, Copyright ) case "Q" REM -- Quitting case "T" File_Area_Transfer_Ask case else Beep end select wend end sub sub Menu_Uploader REM ------------------------------------------------------------------ dim Option as string*1 dim File_Name as string dim Index as long dim Rating as real dim Count as long dim Paid as long dim FileRec as FileRecord dim Default as string*1 dim Payments_Total as integer REM Payments_Total = Uploader_Payments_Total_Load ( \ User.UserID, User.Name ) Default = "U" do cls Color ( 10 ) ? Copyright ? ? "EVALFILE UPLOADER MENU" ? ? "You have earned a total of "; Color ( 11 ) ? Dollars_Str ( Payments_Total ); Color ( 10 ) ? " for your uploads." ? ? "C -- Change the description of a file" ? "L -- List users sorted by total upload payments earned" ? "R -- Rating and count of evaluations for a file" ? "S -- Search files (for your username)" ? "Q -- Quit" Color ( 12 ) ? "U -- Upload files" Color ( 10 ) ? "X -- Transfer a file to another file area" ? ? "Option ["; Default; "]: "; input Option Option = UCase ( Option ) if Option = "" then Option = Default end if select case Option case "C" ? "File name: "; input File_Name File_Name = UCase ( File_Name ) ? if GetFileInfo ( FileRec, File_Name ) then if FileRec.UploaderID = User.UserID then do ? FileRec.Name ? FileRec.Description ? ? "Please enter a one-line description for this file [ENTER=Abort]." input FileRec.Description if FileRec.Description = "" then exit do end if FileRec.Description = Mid ( FileRec.Description, 1, 70 ) ? ? FileRec.Description loop until \ InputYesNo ( "Is this the way you want it to read (Y/n)? ", true ) if FileRec.Description <> "" then if not UpdateFile ( FileRec ) then Beep ? "Error: unable to update file description." WaitEnter end if end if else ? "You must be the uploader of the file to change its description." WaitEnter end if else ? "Unable to locate the file "; File_Name; "." ? "You may have mis-spelled it or it might have been deleted." WaitEnter end if case "L" DisplayTextFile ( TrdParty + "\" + PROGRAM_DIR + "\" \ + Upld_Pay_Txt ) WaitEnter case "Q" exit sub case "R" ? "File name: "; input File_Name File_Name = UCase ( File_Name ) ? if Eval_Rec_Get ( Rating, Count, File_Name, Config.Bias_Count ) then ? "File Name Rating Count" ? Pad ( File_Name, 12 ); " "; ? FormatNumber ( Rating, "#.#####" ); " "; ? FormatNumber ( Count, "@####" ); " "; else ? "Evaluation record for """; File_Name; """ not found." ? ? "Possible reasons:" ? "1) the file has not yet been evaluated by a downloader, or" ? "2) the file name has been misspelled." end if WaitEnter case "S" SearchFiles case "U" Upload case "X" File_Transfer_Ask case else Beep end select loop end sub