# User Manual - Mosharef Grammar School Management System

## Getting Started

### Accessing the System

1. Open your browser and navigate to: `http://yourdomain.com/school-management/login.php`
2. Enter your email and password
3. Click "Login"

### First Login

On your first login as admin:
- You'll see the Admin Dashboard with statistics
- The system is ready to configure
- Start by setting up classes and subjects

## Admin Panel Guide

### Dashboard
The main hub showing:
- Total active students
- Total teachers and staff
- Pending admissions and user approvals
- Recent system activity
- Quick action buttons

### Academic Setup

#### Managing Classes
**Path:** Admin → Classes
- Add new classes (Class I through X)
- Edit class details
- Delete classes (if no students enrolled)
- Each class automatically has sections A, B, C

#### Managing Subjects
**Path:** Admin → Subjects
- Add subjects (English, Math, Science, etc.)
- Each subject has a unique code
- Link to classes through assignments

#### Assigning Subjects to Classes
**Path:** Admin → Assign Subjects
- Select a class
- Select subjects that will be taught
- Only assigned subjects appear in marks entry

### Student Management

#### Adding Students Manually
**Path:** Admin → Students
1. Fill in student information (name, DOB, gender)
2. Select class and section
3. Enter parent/guardian details
4. Admission number auto-generated
5. Roll number auto-assigned based on class

#### Managing Online Admissions
**Path:** Admin → Online Admissions
1. View pending applications from public admission form
2. Review student details and payment information
3. Approve: Student account created automatically
4. Reject: Application marked as rejected

#### Bulk Import Students
**Path:** Admin → Students → Bulk Import
- Prepare CSV file with student data
- Import multiple students at once
- Useful for session start with large number of students

### Teacher Management

#### Adding Teachers
**Path:** Admin → Teachers
1. Enter teacher name and email
2. Enter NID number and designation
3. Specify qualifications and joining date
4. Upload profile photo (optional)
5. Login account created automatically

#### Teacher Assignments
**Path:** Admin → Teacher Assignments
- Assign teachers to specific classes
- Assign teachers to specific subjects
- Teachers can only see their assigned classes and subjects

### Academic Operations

#### Marking Attendance
**Path:** Admin → Attendance
1. Select class and section
2. Select attendance date
3. For each student, mark: Present/Absent/Leave
4. Save attendance record
5. Can edit existing records

**Teacher Access:**
- Teachers can only mark attendance for assigned classes
- Attendance for their assigned subjects

#### Entering Marks
**Path:** Admin → Exams & Marks
1. First, schedule exams (select type, class, subject, date)
2. Then, enter marks for each exam
3. Marks are auto-converted to grades based on grading scale
4. GPA calculated automatically

#### Generating Report Cards
**Path:** Admin → Report Cards
1. Select class and section
2. Choose exam type (all, half-yearly, final)
3. Select student from list
4. View/Print report card as PDF
5. Can print or save as PDF file

#### Creating Certificates
**Path:** Admin → Certificates
1. Select student
2. Choose certificate type:
   - Character Certificate
   - Transfer Certificate
   - Conduct Certificate
3. Generate certificate
4. Print or save as PDF

#### Generating ID Cards
**Path:** Admin → ID Cards
1. Select class
2. Click "Generate Cards for Class"
3. System creates bulk ID cards
4. Print multiple cards per page
5. Cut and laminate cards

### Fee Management

#### Creating Monthly Fees
**Path:** Admin → Fees
1. Select class
2. Enter month name
3. Enter fee amount (in BDT)
4. Set due date
5. Click Create Fees - applies to all students in class

#### Recording Payments
**Path:** Admin → Fees
1. Click "Pay" button for a student's fee record
2. Enter payment amount received
3. Enter transaction ID (bKash, bank transfer, etc.)
4. Status auto-updates to "Paid" or "Partial"

#### Payment Reports
**Path:** Admin → Payments
- View payment statistics:
  - Total collected
  - Fully paid invoices
  - Partially paid
  - Unpaid
- See recent payment history with transaction details

### User Management

#### Approving New Users
**Path:** Admin → Users
- New teachers and staff registrations appear as "Pending"
- Review user details
- Approve: User can now login
- Reject: User account disabled

#### Managing User Roles
- Admin: Full system access
- Teacher: Can mark attendance, enter marks for assigned subjects
- Staff: Limited administrative access
- Student: Can view own records

### Reports and Logs

#### Activity Logs
**Path:** Admin → Activity Logs
- View all system activities
- Track who did what and when
- Audit trail for compliance

## Teacher Panel

### Dashboard
- Shows your assigned classes and subjects
- Your students count
- Quick links to mark attendance and enter marks

### Marking Attendance
- Access only for your assigned classes
- Same process as admin
- Can edit your own attendance records

### Entering Marks
- Only for exams you're assigned to
- For only your assigned subjects
- Cannot see other teachers' marks

### Viewing Reports
- Can view report cards for your students (read-only)
- Cannot modify report cards
- Can export/print for records

### Profile Management
- View and edit your profile information
- Upload profile photo
- Change your password
- Update contact details

## Online Admission Form

### For Public (Parents/Students)

**Access:** `http://yourdomain.com/school-management/public/admission.php`

**Step 1: Student Information**
- Enter student name, DOB, gender
- Select class applying for
- Provide contact email and phone

**Step 2: Guardian Information**
- Enter father and mother names
- Provide residential address
- Enter city and postal code

**Step 3: Payment**
- Registration fee amount displayed (BDT 500)
- Instructions to send to bKash merchant: 01629772919
- Enter bKash transaction ID received
- Submit application

**After Submission:**
- Application appears in admin's pending list
- Admin reviews and approves/rejects
- Student notified by email of approval status
- Upon approval, student account created automatically

## Common Tasks

### How to Add a New Class
1. Go to Admin Dashboard
2. Click "Manage Classes" under Academic Management
3. Fill in class name (e.g., "Class V")
4. Enter numeric value (e.g., "5")
5. Click "Add Class"
6. System auto-creates sections A, B, C

### How to Create Report Cards
1. Go to Admin → Report Cards
2. Select Class and Section from dropdowns
3. (Optional) Select specific exam type
4. Click on student name
5. Report card opens in new window
6. Use browser's Print function to save as PDF

### How to Resolve Payment Issues
1. Go to Admin → Fees
2. Filter by student or status
3. Click "Pay" for the fee record
4. If payment already made but not recorded:
   - Enter the amount paid
   - Enter the original transaction ID
   - Status will update automatically

### How to Restore Student After Withdrawal
1. Go to Admin → Students
2. Find the student record
3. Change status from "Inactive" to "Active"
4. Attendance and marks will be available again

## Tips and Best Practices

1. **Backup regularly**: Backup database monthly using cPanel
2. **Use HTTPS**: Ensure SSL certificate installed for security
3. **Strong passwords**: Use unique admin password, change quarterly
4. **Regular updates**: Keep PHP and MySQL updated when possible
5. **Monitor logs**: Check activity logs weekly for unauthorized access
6. **Test before go-live**: Create test classes and students first
7. **Communication**: Send class teachers report card links regularly
8. **Fee tracking**: Review unpaid fees monthly and send reminders
9. **Admissions**: Review pending admissions daily during admission season
10. **Backups**: Keep off-site backups for disaster recovery

## Troubleshooting

### Forgot Admin Password
1. Access database via cPanel phpMyAdmin
2. Go to `users` table
3. Find your admin account
4. Set a new password using bcrypt generator online
5. Update the password field

### Cannot upload student photos
- Check file size (max 5MB)
- Use JPG or PNG format
- Verify uploads directory permissions (755)
- Check server's upload_max_filesize in PHP settings

### Report card not showing marks
- Verify exam is scheduled for the subject
- Check marks are entered for student/exam
- Ensure subject is assigned to the class

### Online admission form not working
- Verify public/admission.php file exists
- Check file permissions (644)
- Verify database connection is working
- Check browser console for JavaScript errors

### Performance issues with many students
- Run database optimization: `OPTIMIZE TABLE marks, attendance`
- Enable PHP caching if available
- Consider archiving old academic year data

## Security Reminders

1. Never share admin password
2. Always use HTTPS (install SSL certificate)
3. Keep backups in secure location
4. Restrict admin panel access by IP if possible
5. Change default settings in config files
6. Disable file listing in directories
7. Keep plugins and extensions updated
8. Monitor for suspicious activities in logs
9. Implement strong password policies
10. Regular security audits and backups

## Support Resources

For technical issues:
1. Check README.md for system information
2. Review error logs in cPanel
3. Verify database integrity using phpMyAdmin
4. Test with simpler operations first
5. Clear browser cache and try again
6. Check server PHP error logs

For feature requests or customization:
- Document your requirements
- Provide examples of desired functionality
- Contact your system administrator or developer
