echo ucfirst($type); ?> </h2> <?php switch ($type) { case 'user': if ($user->is_allowed('add_user')) { echo user_form(); } else { echo edgimo_error('Your user role (' . $user->role . ') is not allowed to add new Users.'); } break; case 'faculty': if ($user->is_allowed('add_faculty')) { echo faculty_form(); } else { echo edgimo_error('Your user role (' . $user->role . ') is not allowed to add new Faculty.'); } break; case 'activity': if ($user->is_allowed('add_activity')) { echo activity_form(); } else { echo edgimo_error('Your user role (' . $user->role . ') is not allowed to add new Activities'); } break; } ?>
<div class="col-md-10"> <h2>Edit <?php echo $type; ?> </h2> <?php switch ($type) { case 'User': echo user_form($id); break; case 'Activity Content': echo activity_content_form($id); break; case 'Faculty': echo faculty_form($id); break; case 'Activity': echo activity_form($id); break; case 'Stock File': echo stockfiles_form($id); } ?> </div> </div> </div>