fahim8401/hplink-crm
Composer 安装命令:
composer create-project fahim8401/hplink-crm
包简介
HPLink CRM - Raw PHP CRM for cPanel/shared hosting
README 文档
README
Version: 1.0.0
Requirements
- PHP 8.0+ or 8.1+
- MySQL (5.7+ recommended)
- Extensions:
pdo_mysql,mbstring,json,fileinfo - Shared hosting/cPanel compatible (no Composer or external PHP packages)
Setup & Installation (Local or cPanel)
Recommended: Use the Install Wizard
- Upload the entire
hplinkcrmfolder to your desired location (e.g.,public_html/hplinkcrm). - Set permissions for
storage/exportsandstorage/logsto writable (chmod 755orchmod 775as needed). - Visit
install/index.phpin your browser.- The wizard will check PHP extensions and folder permissions.
- Enter your database credentials, timezone, and currency.
- The wizard will write
config.phpand import the database schema and seed data. - On completion, you will see the default admin login and security reminders.
- Important: Delete the
install/folder after installation for security.
Manual Setup (Advanced):
- Copy
config.php.exampletoconfig.phpand update DB credentials and app settings. - Import
database/schema.sqlanddatabase/seed.sqlusing phpMyAdmin or MySQL CLI. - Set permissions for
storage/exportsandstorage/logsto writable. - Open
index.phpin your browser.
Pending Transaction Reminder:
- Each pending transaction now has a
settle_datefield (date to remind for collection). - Use this field to track when to follow up for payment.
Cron Example (Month Close):
php /home/username/hplinkcrm/close_month.php 2025-09
Security
- Change the default admin password after first login (
admin@example.test/Admin@123). - Remove seed users after deployment.
- All passwords are hashed with
password_hash(). - CSRF protection has been removed at user request.
- Output escaped with
htmlspecialchars(). - Delete the
install/folder after installation for security.
Troubleshooting
- DB Connection: Check credentials in
config.php. - Permission Denied: Ensure
storage/subfolders are writable. - Session Path: Ensure PHP session path is writable. Use
install/session_test.phpto verify session persistence. If sessions do not persist, login will fail. - exec() Disabled: Some features (month close via web) require
exec().
Manual Test Checklist
- Login as admin, HR, employee; verify role restrictions.
- Create transaction as HR with salary deduction; check salary tracker.
- Mark pending transaction as received; check changed_by/changed_at.
- Run close_month script; verify CSV and pending moved to next month.
Database Schema Notes
- The
transactionstable includes asettle_datecolumn for pending transactions. - Use this date to trigger reminders or reports for money collection.
File Structure
hplinkcrm/
├─ index.php
├─ .htaccess
├─ assets/
├─ controllers/
├─ services/
├─ lib/
├─ views/
│ └─ layout/
├─ storage/
│ ├─ exports/
│ └─ logs/
├─ database/
│ ├─ schema.sql
│ └─ seed.sql
├─ install/
│ └─ index.php
├─ config.php.example
├─ config.php
├─ close_month.php
└─ README.md
Deployment (cPanel)
- Upload the entire
hplinkcrmfolder to your desired location (e.g.,public_html/hplinkcrm). - Visit
install/index.phpin your browser to run the installer, or copyconfig.php.exampletoconfig.phpand edit manually. - Create MySQL DB & user, set credentials in
config.php. - Import
database/schema.sqlanddatabase/seed.sqlvia phpMyAdmin or MySQL CLI, or use the installer. - Set permissions for
storage/to 755/775 as required. - Cron example:
php /home/username/hplinkcrm/close_month.php 2025-09run monthly.
Troubleshooting
- DB Connection: Check credentials in
config.php. - Permission Denied: Ensure
storage/subfolders are writable. - Session Path: Ensure PHP session path is writable.
- exec() Disabled: Some features (month close via web) require
exec().
Manual Test Checklist
- Run the install wizard and verify all requirements and permissions are checked.
- Login as admin, HR, employee; verify role restrictions.
- Create transaction as HR with salary deduction; check salary tracker.
- Mark pending transaction as received; check changed_by/changed_at.
- Run close_month script; verify CSV and pending moved to next month.
Changelog
Version 1.0.0 (2024)
- Fixed: Missing dependencies in lib/helpers.php - added required includes for auth.php and database.php
- Fixed: Incomplete employee management routing - enabled full employee CRUD functionality
- Added: Employee management views and interface
- Added: Version tracking in composer.json
- Improved: Code structure and dependency management
- Enhanced: Employee listing with proper table layout and actions
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-09-28