Mr.Combet Webshell
Your IP :
216.73.216.136
Server IP :
103.233.58.157
Server :
Windows NT WIN-4PGF72KEHKB 10.0 build 17763 (Windows Server 2016) AMD64
Server Software :
Microsoft-IIS/10.0
PHP Version :
7.3.25
Add File :
Submit
Add Directory :
Submit
Dir :
C:
/
inetpub
/
wwwroot
/
mapqa
/
Views
/
User
/
View File Name :
Index.cshtml
@model List<RER_Project.DataAccess.Functions.FnUserList> @{ ViewBag.Title = "User Lists"; } @using RER_Project.BusinessLayer.BusinessService @using RER_Project.Core.Helpers @{ var meta = AppUserService.GetCurrent(); } <div class="wrapper wrapper-content animated fadeInRight"> <div class="row"> <div class="col-lg-12"> <div class="ibox float-e-margins"> <div class="ibox-content"> <div class="row"> <div class="col-lg-5"> <nav aria-label="breadcrumb"> <ol class="breadcrumb"> <li class="breadcrumb-item"><a href="#"><strong>User Management</strong></a></li> <li class="breadcrumb-item active"><a href="#"><strong>User List</strong></a></li> </ol> </nav> </div> <div class="col-lg-offset-5 col-lg-2 "> @if (meta.RoleId == (int)EnumRoleHelper.Roles.Admin || meta.RoleId == (int)EnumRoleHelper.Roles.MnE || meta.RoleId == (int)EnumRoleHelper.Roles.ProjectDirector) { <a href="/users/create" class="btn btn-primary pull-right">Create User</a> } </div> </div> <hr style="margin-top:5px;margin-bottom:20px" /> <div class="form-horizontal"> @*<div class="form-group"> <div class="col-md-1 control-label"> <strong> Name:</strong> </div> <div class="col-md-2"> <input type="text" id="userNameSearch" name="userNameSearch" value="@ViewBag.userName" class="form-control" /> </div> <div class="col-md-1 control-label"> <strong> Role:</strong> </div> <div class="col-md-2"> <select type="text" class="form-control required" name="RoleId" id="RoleId" data-api="/roles/select"></select> </div> <div class="form-group"> <div class="col-md-1"> <button type="button" id="searchUser" name="searchUser" class="btn btn-primary center-orientation"><i class="fa fa-search" aria-hidden="true"></i></button> </div> </div> </div>*@ </div> @*<hr style="margin-top:-15px;margin-bottom:10px" />*@ <div class="table-responsive"> <table class="footable table table-hover dataTables" data-page-size="8" data-filter=#filter id="userListTable"> <thead> <tr> <th>SN</th> <th>Username</th> <th>Fullname</th> <th>Mobile No</th> <th>Province</th> <th>Atoll</th> <th>Work Station</th> <th>Role</th> <th>Is Active</th> <th>Actions</th> </tr> </thead> <tbody> @foreach (var item in Model) { <tr> <td>@item.sn</td> <td>@item.email </td> <td>@item.user_name</td> <td>@item.mobile_no</td> <td>@item.province </td> <td>@item.district</td> <td>@item.work_station</td> <td>@item.role_name</td> <td> @if (meta.RoleId == (int)EnumRoleHelper.Roles.Admin || meta.RoleId == (int)EnumRoleHelper.Roles.MnE || meta.RoleId == (int)EnumRoleHelper.Roles.MnEOfficer) { <input type="checkbox" onclick="activeInActiveUser('@item.user_id')" name="IsDiscontinue" @(item.deleted == false ? "checked" : "") id="IsGals" class="chkBoxForDiscontinueMember"> } else { <input type="checkbox" disabled name="IsDiscontinue" @(item.deleted == false ? "checked" : "") id="IsGals" class="chkBoxForDiscontinueMember"> } </td> <td> @if (meta.RoleId == (int)EnumRoleHelper.Roles.Admin || meta.RoleId == (int)EnumRoleHelper.Roles.MnE || meta.RoleId == (int)EnumRoleHelper.Roles.MnEOfficer || meta.RoleId == (int)EnumRoleHelper.Roles.ProjectDirector) { <a class="btn btn-default btn-xs" style="color:dodgerblue" href="@("/users/edit/" + item.user_id)" title="Edit"><i class="fa fa-edit"></i></a> } </td> </tr> } </tbody> </table> </div> </div> </div> </div> </div> </div> <!-- #region datatables files --> <link href="~/Content/datatables.min.css" rel="stylesheet" /> <script src="~/Scripts/datatables.min.js"></script> <!-- #endregion --> <script> @*$(document).ready(function () { var jsonData = @Html.Raw(Json.Encode(Model)); var tmpData = {"data": jsonData}; console.log(tmpData); $('.userDataTable').DataTable({ pageLength: 25, responsive: true, "ajax": { "url": "/users/search/all", "type": "GET", "datatype":"json" }, "columns": [ { "data": "user_name" }, { "data": "email" } ] }); }); //$(function () { @*window.initializeSelectApis(); @if (ViewBag.Page== null || ViewBag.Page== "") { ViewBag.Page = 1; } var userName = $("#userNameSearch").val(); $('#data').on('click', function (e) { document.getElementById("form").submit(); }); WorkForce.loader.show(); loadUsers(); $("#searchUser").off("click").on("click", function () { WorkForce.loader.show(); loadUsers(); }) function loadUsers() { userName = $("#userNameSearch").val(); var roleId = $("#RoleId").val(); $('#loadPartialView').load("/users/search?page=" + @ViewBag.Page + "&userName=" + userName+"&role=" + roleId, function (response, status, xhr) { if (status == "error") { var msg = "Sorry but there was an error: "; ShowMessage("error", "error", msg + xhr.status + " " + xhr.statusText); }; WorkForce.loader.hide(); }); } });*@ </script> <script> $(document).ready(function () { $('#userListTable').DataTable({ stateSave: true, fixedHeader: true, pageLength: 15, dom: '<"html5buttons"B>lTfgitp', buttons: [ //{ extend: 'copy' }, //{ extend: 'csv' }, //{ extend: 'excel', title: 'ExampleFile' }, //{ extend: 'pdf', title: 'ExampleFile' }, //{ // customize: function (win) { // $(win.document.body).addClass('white-bg'); // $(win.document.body).css('font-size', '10px'); // $(win.document.body).find('table') // .addClass('compact') // .css('font-size', 'inherit'); // } //} ] }); }); function activeInActiveUser(event) { let conf = confirm(`Are you sure to change user status ?`); if (!conf) { window.location.href = "/users"; return; } else { WorkForce.loader.show(); var xhr = new XMLHttpRequest(); var jsonData = { UserId: event }; var urlSearchParams = new URLSearchParams(jsonData); xhr.open('POST', '/users/status/change', true); xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded'); xhr.onload = function () { if (this.status == 200) { WorkForce.loader.hide(); window.location.href = "/users"; } else { WorkForce.loader.hide(); } } xhr.send(urlSearchParams); } } </script>