@using Project_Unite.Models; @using Microsoft.AspNet.Identity; @using Project_Unite.Controllers; @{ ViewBag.Title = "Administration Control Panel"; var db = new ApplicationDbContext(); }

Administration Control Panel

Welcome to the ShiftOS Administration Control Panel. To begin administrating, select an option from the left.

System status

Current user: @Html.UserLink(User.Identity.GetUserId())
Users: @db.Users.Count()
Forum Categories: @db.ForumCategories.Count()
Posts: @db.ForumPosts.Count()
Topics: @db.ForumTopics.Count()
Skins: @db.Skins.Count()
Releases: @db.Downloads.Count()

Shifting the website

You can add new features to the website by modifying our GitHub repository. If you are a ShiftOS developer, chances are you have write access to the repository. If not, please contact Michael.

To clone the repository, use this command:

@Html.Markdown(@"```bash git clone https://github.com/MichaelTheShifter/Project-Unite ```")

Your changes will be applied after you push your commits to this repository, or your pull request gets merged.

Site Configuration

This feature is not yet implemented.

@*ROLES*@

Roles

Here, you can see a list of all the roles in the system.

    @for (int i = 0; i < db.Roles.GetPageCount(10); i++) { string htmlClass = ""; if (i == 0) { htmlClass = "active"; } int page = i + 1;
  • @page
  • }
@for (int i = 0; i < db.Roles.GetPageCount(10); i++) { string htmlClass = "tab-pane fade in"; if (i == 0) { htmlClass += " active"; }
@{ var roles = db.Roles.ToArray(); roles = roles.OrderByDescending(x => (x as Role).Priority).ToArray(); } @foreach (Role role in roles.GetItemsOnPage(i, 10)) { }
Role Priority Actions

@role.Name

ID: @role.Id •Users: @role.Users.Count() • Priority: @role.Priority

@if(role.Priority > 0) { } @if (role.Priority < roles.Length - 1) { } Details
}
@*SKINS*@

Skins

Below is a list of all skins in the system.

    @for (int i = 0; i < db.Skins.GetPageCount(10); i++) { string htmlClass = ""; if (i == 0) { htmlClass = "active"; } int page = i + 1;
  • @page
  • }
@for (int i = 0; i < db.Skins.GetPageCount(10); i++) { string htmlClass = "tab-pane fade in"; if (i == 0) { htmlClass += " active"; }
@foreach (var skin in db.Skins.OrderByDescending(x => x.PostedAt).ToArray().GetItemsOnPage(i, 10)) { }
Skin Actions
@Html.ActionLink(skin.Name, "ViewSkin", "Skins", new { id = skin.Id }, null)

Created at: @skin.PostedAt • Likes: @skin.Likes.Count() • Dislikes: @skin.Dislikes.Count() • Views: @skin.Views.Count()

@Html.Markdown(skin.ShortDescription)

Moderate
}
@foreach (var user in db.Users.ToArray()) { } @*USERS*@

Users

Below is a paginated list of all users in the database, most recent users first.

    @for (int i = 0; i < db.Users.GetPageCount(10); i++) { string htmlClass = ""; if(i == 0) { htmlClass = "active"; } int page = i + 1;
  • @page
  • }
@for(int i= 0; i < db.Users.GetPageCount(10); i++) { string htmlClass = "tab-pane fade in"; if(i==0) { htmlClass += " active"; }
@foreach (var user in db.Users.OrderByDescending(x=>x.JoinedAt).ToArray().GetItemsOnPage(i, 10)) { }
User Actions
@Html.UserLink(user.Id)

Joined on: @user.JoinedAt • Banned: @user.IsBanned • Posts: @user.PostCount • Topics: @user.TopicCount

View Profile Moderate
}