# SalamBaba Suite (Forms + Video + Mini-CRM) - Minimal PHP App

## What you get
- Admin panel (login/logout/dashboard)
- Forms (CRUD: define forms & fields, public form endpoint, store responses, file upload)
- Video upload portal (public) + list in admin
- Email notify using PHP `mail()` (optional)

## Install
1) Import `schema.sql` into your MySQL DB.
2) Edit `includes/config.php` if needed (DB creds already filled for your case; adjust `APP_BASE_URL` to your path).
3) Upload the entire folder to your server, e.g. to `/form/forms/`.
4) Visit `.../admin/login.php` — user `admin`, pass `changeme123` (will auto-upgrade to bcrypt on first login).

## Public endpoints
- `/public/form.php?slug=YOUR_FORM_SLUG`
- `/public/video_upload.php`

## Security & Notes
- Move `includes/` out of webroot if possible; otherwise set file perms (`db.php` → 640) and folder `tmp` → 700.
- `uploads/` contains user files; consider serving via a subdomain or protect direct listing.
- For SMTP, replace the body of `sb_send_mail` in `includes/mailer.php` with your SMTP implementation.
- Limit file types if needed (MIME checks) and add captcha/rate limit for public forms if you expect abuse.
