-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
281 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,188 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<% include ../partials/header %> | ||
<link rel="stylesheet" href="/css/scams.css"> | ||
</head> | ||
|
||
<body> | ||
<% include ../partials/navbar %> | ||
<div class="ui body container"> | ||
<div class="ui grid"> | ||
<div class="four wide column"> | ||
<div class="ui tiny statistic"> | ||
<div class="value"> | ||
<%= total %> | ||
</div> | ||
<div class="label"> | ||
Total scams | ||
</div> | ||
</div> | ||
</div> | ||
<div class="four wide column"> | ||
<div class="ui tiny statistic"> | ||
<div class="value"> | ||
<%= active %> | ||
</div> | ||
<div class="label"> | ||
Active scams | ||
</div> | ||
</div> | ||
</div> | ||
<div class="four wide column"> | ||
<div class="ui tiny statistic"> | ||
<div class="value"> | ||
<%= total_addresses %> | ||
</div> | ||
<div class="label"> | ||
Addresses registered | ||
</div> | ||
</div> | ||
</div> | ||
<div class="four wide column"> | ||
<div class="ui tiny statistic"> | ||
<div class="value"> | ||
<%= inactive %> | ||
</div> | ||
<div class="label"> | ||
Inactive scams | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<h1 class="scams"><i class="protect icon"></i> Scams</h1> | ||
<table class="ui sortable celled table"> | ||
<thead> | ||
<tr> | ||
<% if(sorting == "category") { %> | ||
<th class="sorted descending">Category</th> | ||
<% } else { %> | ||
<th>Category</th> | ||
<% } %> | ||
<% if(sorting == "subcategory") { %> | ||
<th class="sorted descending">Subcategory</th> | ||
<% } else { %> | ||
<th>Subcategory</th> | ||
<% } %> | ||
<% if(sorting == "status") { %> | ||
<th class="sorted descending">Status</th> | ||
<% } else { %> | ||
<th>Status</th> | ||
<% } %> | ||
<% if(sorting == "name") { %> | ||
<th class="sorted descending">Name</th> | ||
<% } else { %> | ||
<th>Name</th> | ||
<% } %> | ||
<th id='info'>Info</th> | ||
</tr></thead> | ||
<tbody> | ||
<% scams.forEach(scam => { %> | ||
<tr> | ||
<% if("category" in scam && scam.category) { %> | ||
<% if(scam.category == "Phishing") { %> | ||
<td><i class="address book icon"></i> Phishing</td> | ||
<% } else if(scam.category == "Scamming") { %> | ||
<td><i class="address book icon"></i> Scamming</td> | ||
<% } else if(scam.category == "Fake ICO") { %> | ||
<td><i class="address book icon"></i> Fake ICO</td> | ||
<% } else { %> | ||
<td><i class="address book icon"></i> <%= scam.category %></td> | ||
<% } %> | ||
<% } else { %> | ||
<td><i class="remove icon"></i> None</td> | ||
<% } %> | ||
<% if("subcategory" in scam && scam.subcategory) { %> | ||
<% if(scam.subcategory == "Wallets") { %> | ||
<td><i class="credit card alternative icon"></i> Wallets</td> | ||
<% } else if(scam.subcategory == "Trust-Trading") { %> | ||
<td><i class="handshake outline icon"></i> Trust-Trading</td> | ||
<% } else { %> | ||
<td><img src='/assets/<%= scam.subcategory.toLowerCase().replace(/\s/g, "") %>.png' class='subcategoryicon' onerror="this.style.display='none'"> <%= scam.subcategory %></td> | ||
<% } %> | ||
<% } else { %> | ||
<td><i class="remove icon"></i> None</td> | ||
<% } %> | ||
<% if("status" in scam && scam.status) { %> | ||
<% if(scam.status == "Active") { %> | ||
<td class='offline'><i class='warning sign icon'></i> Active</td> | ||
<% } else if(scam.status == "Inactive") { %> | ||
<td class='suspended'><i class='remove icon'></i> Inactive</td> | ||
<% } else if(scam.status == "Suspended") { %> | ||
<td class='suspended'><i class='remove icon'></i> Suspended</td> | ||
<% } else if(scam.status == "Offline") { %> | ||
<td class='activ'><i class='checkmark icon'></i> Offline</td> | ||
<% } %> | ||
<% } else { %> | ||
<td>Unknown</td> | ||
<% } %> | ||
<% if(scam.getHostname().length > 40) { %> | ||
<td><%= scam.getHostname().substring(0, 40) %>...</td> | ||
<% } else { %> | ||
<td><%= scam.getHostname() %></td> | ||
<% } %> | ||
<td class='center'> | ||
<a href='/domain/<%= scam.getHostname() %>'><i class='search icon'></i></a> | ||
</td> | ||
</tr> | ||
<% }); %> | ||
</tbody> | ||
</table> | ||
<% if(page !== "all") { %> | ||
<div class="ui pagination menu"> | ||
<% | ||
let strPagination = ""; | ||
let intCurrentPage = parseInt(page || 0); | ||
let arrLoop = [-2, 3]; | ||
if (intCurrentPage == 0) arrLoop = [1, 6]; | ||
else if (intCurrentPage == 1) arrLoop = [0, 5]; | ||
else if (intCurrentPage == 2) arrLoop = [-1, 4]; | ||
for (var i = arrLoop[0]; i < arrLoop[1]; i++) { | ||
var intPageNumber = intCurrentPage+i; | ||
var strItemClass = "item"; | ||
var strHref = "/coin/" + coin + "/" + intPageNumber + "/"; | ||
if (sorting) strHref += sorting + "/"; | ||
if ((intPageNumber > (scamsLength) / MAX_RESULTS_PER_PAGE) || (intPageNumber < 1)) { | ||
strItemClass = "disabled item"; | ||
strHref = "#"; | ||
} else if (intCurrentPage == intPageNumber) { | ||
strItemClass = "active item"; | ||
} | ||
strPagination += "<a href='" + strHref + "' class='" + strItemClass + "'>" + intPageNumber + "</a>"; | ||
} | ||
if (intCurrentPage > 3) { | ||
if (sorting) { | ||
strPagination = "<a class='item' href='/coin/" + coin + "/1/" + sorting + "'><i class='angle double left icon'></i></a>" + strPagination; | ||
} else { | ||
strPagination = "<a class='item' href='/coin/" + coin + "/1/" + sorting + "'><i class='angle double left icon'></i></a>" + strPagination; | ||
} | ||
} | ||
if (intCurrentPage < Math.ceil(scamsLength / MAX_RESULTS_PER_PAGE) - 3) { | ||
if (sorting) { | ||
strPagination += "<a class='item' href='/coin/" + coin + "/" + (Math.ceil(scamsLength / MAX_RESULTS_PER_PAGE) - 1) + "/" + sorting + "'><i class='angle double right icon'></i></a>"; | ||
} else { | ||
strPagination += "<a class='item' href='/coin/" + coin + "/" + (Math.ceil(scamsLength / MAX_RESULTS_PER_PAGE) - 1) + "'><i class='angle double right icon'></i></a>"; | ||
} | ||
} | ||
%> | ||
<%- strPagination %> | ||
</div> | ||
<% } %> | ||
</div> | ||
</div> | ||
<% include ../partials/footer %> | ||
<script>const coin = "<%= coin %>";</script> | ||
<script src="/js/coin.js"></script> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
window.addEventListener("load", function() { | ||
$("th").click(function() { | ||
if($(this).html() !== 'Info') { | ||
$("th").removeClass("sorted descending"); | ||
$(this).addClass("sorted descending"); | ||
path = window.location.pathname.split("/"); | ||
if(!(3 in path) || path[3] === '') { | ||
window.location = "/coin/" + coin + "/1/" + $(this).html().toLowerCase(); | ||
} else { | ||
window.location = "/coin/" + coin + "/" + path[3] + "/" + $(this).html().toLowerCase(); | ||
} | ||
} | ||
}); | ||
}); |