demo.mp4explains the user interface. See video- just compile and run
app.c - Admin password is
61770
- I used some ANSI COLORS to style the terminal output.
#define RED "\x1b[31m"...#define RESET "\x1b[0m"It's very simple to useprintf("\n" GREEN "Colored String" RESET "\n "). Source
- It should exactly look like this to make the programs work properly.
404command willautomatically erase/updatethe files. We don't need to manually clear them.- Image
- App
Image
-Admin Panel
Image
0. Menu
Image1. New Card
Image2. Delete Card
Image3. Unblock Account
Image4. History
Image5. Statistics
Image6. Search User
Image7. Exit
will exit the program.
This project is for educational purpose only.
_SETUP()
Creates directories and files. Initializes default values. First-time setup.
generateCardAndAppend()
Generates random card numbers. Saves to appropriate file.removeCard()
Deletes specific card from FreshCards.deleteCard()
Finds and removes card by number.deleteDialog()
UI for card deletion options.
unblock()
Removes number from blocked list.showBlockList()
Displays all blocked numbers.unlockAccount()
Unblocks user account.showStatistics()
Displays sales and stock data.showHistory()
Shows all transactions.searchUserTransaction()
Finds transactions by phone number.
updateSold()
Increments sold card count.updateAdminBalance()
Updates admin's balance.commitRecharge()
Validates and processes card recharge.
showMinutes()
Displays user's remaining minutes.updateBalance()
Updates user's minute balance.isBlocked()
Checks if user is blocked.logOut()
Clears current session.clientPanel()
Main user interface handler.
formatDate()
Converts timestamp to readable format.resetCurrentNumber()
Clears current user session.checkIfBlocked()
Verifies if current user is blocked.
adminPanel()
Admin control interface.showDialog()
User menu interface.main()
Entry point with role selection.